Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-06-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #49327: PHP Warning on logout: Illegal string offset 'uid' in AjaxLoginHandler.php on line 90Closed2013-06-21

Actions
Related to TYPO3 Core - Bug #59364: Illegal string offset 'uid' in TypoScriptFrontendController.php line 1281Closed2014-06-05

Actions
Actions #1

Updated by Markus Klein over 11 years ago

This is really strange.
Do you have any special extensions running?

Actions #2

Updated by Chris topher over 11 years ago

I have some extensions running, but none, which would change anything with user authentication...

Actions #3

Updated by Alexander Stehlik over 11 years ago

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.

Actions #4

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23116

Actions #5

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23116

Actions #6

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23116

Actions #7

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23916

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23917

Actions #9

Updated by Alexander Stehlik about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF