Open kirancheema opened 9 years ago
quick fix is to turn off "sync on login"
factory.php needs changing
150 to $username = strtolower(JArrayHelper::getValue($user, 'username', null, 'array')[0]);
I'll get right on this in a couple of hours.
I can't understand how it can't be an array as there is a check before hand:
if (is_array($user)) { $username = strtolower(JArrayHelper::getValue($user, 'username', null, 'string')); .... }
You sure its occurring from that? I can't get to my test environment for another couple of hours yet.
actually ignore the previous..
the issue is 227 I think
if ($password = JArrayHelper::getValue($user, 'password', false))
changed this to if ($password = JArrayHelper::getValue($credentials, 'password', false)) and it works fine
Profile.php onLdapSync line 232 is passing in $username as a string to the getuseradapter function
Yes, OK. Can only guess that Joomla have enforced that parameter. Can confirm in a minute.
Yea as expected, they enforced the array in 3.4:
In 2.5 it was https://github.com/joomla/joomla-cms/blob/2.5.x/libraries/joomla/utilities/arrayhelper.php#L277 whereas now its https://github.com/joomla/joomla-cms/blob/staging/libraries/vendor/joomla/utilities/src/ArrayHelper.php#L242
I shouldn't have allowed anything but an array to go through so that is pretty bad. But in previous versions it just returned null if it wasn't an array. I will go round and ensure all calls to ArrayHelper::getValue is checking the first parameter is an array. I cannot start this until I'm back at my computer. Maybe hacking Joomla at /libraries/vendor/joomla/utilities/src/ArrayHelper.php by changing:
public static function getValue(array $array, $name, $default = null, $type = '') to public static function getValue($array, $name, $default = null, $type = '')
is a better temporary solution until I release a proper fix later today.
No worries its seems stable for the moment so will leave as is until your official fix
I have just built http://server.shmanic.co.uk/jmml_builds/2.0.3.1/packages/ which I have just started to test. Instead of changing logic in many places, I have just forked the method from Joomla 3.3 and performed a sed across all instances of JArrayHelper::getValue(). Question now is whether there are other changes like this.
If anybody could test http://server.shmanic.co.uk/jmml_builds/2.0.3.1/packages/ then that'll be great. From initial tests, it looks like it works correctly and if no further issues are found I will release this in the coming hours and push an auto-update as well.
I did a test with lib_shmanic.zip 25-Feb-2015 18:47
Are you going to push this by the web updater? Thanks!
Awesome guys :). Thanks a bunch, you saved me a headache
I can also confirm that the updated lib_shmanic.zip 25-Feb-2015 18:47 resolved the issue. Here's what I did:
@shmaunder I think this one can be closed
Hi Shaun
Just updated an Install to Joomla 3.4 and the following is happening:
Catchable fatal error: Argument 1 passed to Joomla\Utilities\ArrayHelper::getValue() must be of the type array, string given, called in C:\UniServer\www\scwcsu\libraries\joomla\utilities\arrayhelper.php on line 264 and defined in C:\UniServer\www\scwcsu\libraries\vendor\joomla\utilities\src\ArrayHelper.php on line 242
If you turn off the sync on login for the LDAP Profile plugin It goes through fine ... I have tracked it to
the profile.php line 235 (Ish) $adapter = SHFactory::getUserAdapter($username);