[BUGFIX] Illegal string offset warning in AjaxLoginHandler 71/21571/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:26:17 +0000 (20:26 +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/21571
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/AjaxLoginHandler.php

index c26d96b..010d835 100644 (file)
@@ -87,7 +87,7 @@ class AjaxLoginHandler {
         */
        public function logout(array $parameters, \TYPO3\CMS\Core\Http\AjaxRequestHandler $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));