You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
updateLogin(): get_object_data() result destructured wrongly, "Undefined array key" warnings on every user save #538
w2p_Extensions_Permissions::updateLogin() (classes/w2p/Extensions/Permissions.class.php, line 142 on master and dev-5.0.0) unpacks the result of get_object_data() as if it were a single row:
get_object_data() returns a list of rows (other callers use $aro_info[0][0], $mod_info[0][1]), so list() reads keys 0-4 of the outer array. Only key 0 exists.
Effects
PHP logs Undefined array key 1 … 4 every time a user is stored (CUser::store() calls updateLogin()).
$oname is always null, so the ARO is rewritten on every save, even when the username hasn't changed.
If the comparison ever matched, $res would be undefined at return $res;.
Seen in the PHP log while testing GHSA-qqx6-f7cc-3wf2 on a fresh install (PHP 8.3.6, MariaDB).
Activity