Bug #88984

Exception in BackendController 'Cannot use object of type stdClass as array' on $collapseState ( line 254 )

Added by Philipp Parzer almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2019-08-20
Due date:
% Done:

100%

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

Description

After updating to v9.5.9 and logging in to the backend i instantly received this exception.

The result of my debugging says that $this->getBackendUser()->uc['BackendComponents']['States']['typo3-module-menu'] is an object of type stdClass and so the ['collapsed'] call fails.


Files

Bildschirmfoto 2019-08-20 um 13.39.55.png (130 KB) Bildschirmfoto 2019-08-20 um 13.39.55.png Screenshot of stacktrace Philipp Parzer, 2019-08-20 13:40

Related issues

Related to TYPO3 Core - Bug #89269: $GLOBALS['BE_USER']->uc sometimes wrongly written, gets a stdClass where an array would be expectedClosed2019-09-25

Actions
Related to TYPO3 Core - Bug #89268: Cannot use object of type stdClass as array in BackendUserConfiguration.phpClosedChristian Eßl2019-09-25

Actions
Has duplicate TYPO3 Core - Bug #88997: Error: Cannot use object of type stdClass as arrayClosed2019-08-22

Actions
#1

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61519

#2

Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61519

#3

Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61519

#4

Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61519

#5

Updated by Guido Schmechel almost 2 years ago

  • Has duplicate Bug #88997: Error: Cannot use object of type stdClass as array added
#6

Updated by Riccardo De Contardi almost 2 years ago

I add here the description of issue #88997 to keep track of it:

After Updating from TYPO3 9.5.8 to 9.5.9 I get this error:

(1/1) Error

Cannot use object of type stdClass as array
in /_TYPO3-Sourcen/typo3_src-9.5.9/typo3/sysext/backend/Classes/Controller/BackendController.php line 254

        // Prepare the scaffolding, at this point extension may still add javascript and css
        $view = $this->getFluidTemplateObject($this->templatePath . 'Backend/Main.html');

        $collapseState = $this->getBackendUser()->uc['BackendComponents']['States']['typo3-module-menu']['collapsed'] ?? false;
        $view->assign('moduleMenuCollapsed', $collapseState === true || $collapseState === 'true');
        $view->assign('moduleMenu', $this->generateModuleMenu());
        $view->assign('topbar', $this->renderTopbar());
#7

Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61541

#8

Updated by Andreas Fernandez almost 2 years ago

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

Updated by Christian Eßl over 1 year ago

  • Related to Bug #89269: $GLOBALS['BE_USER']->uc sometimes wrongly written, gets a stdClass where an array would be expected added
#10

Updated by Markus Klein over 1 year ago

  • Related to Bug #89268: Cannot use object of type stdClass as array in BackendUserConfiguration.php added
#11

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF