Bug #49328
closed
PHP Warning: Illegal string offset 'uid' in BackendUserAuthentication.php on line 2064
Added by Chris topher over 11 years ago.
Updated about 6 years ago.
Description
I get this error:
PHP Warning: Illegal string offset 'uid' in typo3\sysext\core\Classes\Authentication\BackendUserAuthentication.php on line 2064
"uid" obviously is not set always.
This is the problematic line:
'userid' => $userId ? $userId : intval($this->user['uid']),
The same solution might also solve #49327.
This is really strange.
Do you have any special extensions running?
I have some extensions running, but none, which would change anything with user authentication...
Just stumbled upon this one today and there is a conceptional problem.
The \TYPO3\CMS\Sv\AbstractAuthenticationService
that is used for all authentication services provides a writelog()
method. This method will use the writelog()
method in the parent \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
object, if the class variable $writeAttemptLog
is TRUE.
So basically an authentication service is supposed to use the writelog()
method when a login attempt was successful or not.
This is working correctly for successful logins, because then the value in $this->user['uid']
is filled. But for failed logins there will always be an error, because $this->user
only contains a string.
This can be fixed quite simple by checking if $this->user
is an array.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF