[BUGFIX] Illegal string offset warning in AjaxLoginHandler 73/21573/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 21 Jun 2013 17:40:21 +0000 (19:40 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 21 Jun 2013 18:56:40 +0000 (20:56 +0200)
After logout $GLOBALS['BE_USER']->user['uid'] is checked.
This is done without isset() which triggers a warning, as ->user is unset,
if the logout was successful.

Resolves: #49327
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Ia13af7f2a75090050113ff6a5d388b790df0bab1
Reviewed-on: https://review.typo3.org/21573
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/classes/class.ajaxlogin.php

index c2420fa..bce0981 100644 (file)
@@ -90,7 +90,7 @@ class AjaxLogin {
         */
        public function logout(array $parameters, TYPO3AJAX $ajaxObj) {
                $GLOBALS['BE_USER']->logoff();
-               if($GLOBALS['BE_USER']->user['uid']) {
+               if(isset($GLOBALS['BE_USER']->user['uid'])) {
                        $ajaxObj->addContent('logout', array('success' => FALSE));
                } else {
                        $ajaxObj->addContent('logout', array('success' => TRUE));