Topic-icon Array Key Errors

Active Subscriptions:

None
10 years 1 hour ago #43370 by stuver
Array Key Errors was created by stuver
Hi

I am getting the following error in my SCLogin module.

Warning: array_key_exists() expects parameter 2 to be array, null given in /home/username/public_html/components/com_jfbconnect/libraries/authentication/oauth2base.php on line 215

I also get the same error for some users, but not all, in the User Map page of the admin.

I am up to date on all extensions and Joomla and use EasySocial for my accounts.

There is no pattern as to why this is happening but EasySocial 1.2.8 had some bugs which needed fixing, the errors are occurring after I upgraded.

Thanks.
The topic has been locked.
Active Subscriptions:

None
9 years 11 months ago #43385 by stuver
Replied by stuver on topic Array Key Errors
Alex, how can I get you the information privately to investigate this?

Thanks.
The topic has been locked.
Support Specialist
9 years 11 months ago #43390 by alzander
Replied by alzander on topic Array Key Errors
Sorry for the delayed response. We are investigating the issue, but my guess is that you're not having any functional issues caused by this (missing avatars, improper logins, etc). The message above is simply a PHP warning message that a call we're making isn't 100% correct. However, it's not an error or something that's critical for functionality.

What I'd recommend is going to the Global Configuration area in Joomla and setting Error Reporting to "None". That will hide all PHP notices and warnings, which is the recommended configuration option for production sites. Showing warnings is useful on development sites so we can narrow down and eliminate these types of issues, but you don't want them shown on production sites for many reasons.

I hope that helps explain. Of course, if you feel there are any functionality issues that aren't working on your site, just let us know. Otherwise, we'll try to get a fix for the in the next release.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 11 months ago #43551 by stuver
Replied by stuver on topic Array Key Errors
Hi Alex

Thanks for the reply and sorry I have not responded sooner, been away.

I still get the error notices with error reporting off but don't think it is affecting users who aren't Super Admins.

I'll keep an eye on it and see what happens.

Thanks.
The topic has been locked.
Support Specialist
9 years 11 months ago #43583 by alzander
Replied by alzander on topic Array Key Errors
If you're still seeing that message with Error Reporting turned off, it means either your server is forcing error reporting to always be on or another extension is. Either way isn't good as those messages shouldn't display on a production / live site.

We've investigated the issue and found the cause. The problem only occurs when a user has authenticated with LinkedIn (or possibly Google+) but is currently logged in using a different social network.. or Joomla credentials. The SCLogin module is trying to fetch the user's avatar from LinkedIn, but the authentication token isn't valid, since the user isn't logged in that way.

We have a fix for the next release that will properly check for an auth token and hide that message. If you want the code update, we can gladly provide it to you as it's just a few lines to change.

Thanks for the report, and sorry for the inconvenience,
Alex
The topic has been locked.