Project

General

Profile

Actions

Bug #88984

closed

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

Added by Philipp Parzer over 5 years ago. Updated almost 5 years 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 3 (0 open3 closed)

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
Actions #1

Updated by Gerrit Code Review over 5 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

Actions #2

Updated by Gerrit Code Review over 5 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

Actions #3

Updated by Gerrit Code Review over 5 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

Actions #4

Updated by Gerrit Code Review about 5 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

Actions #5

Updated by Guido Schmechel about 5 years ago

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

Updated by Riccardo De Contardi about 5 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());
Actions #7

Updated by Gerrit Code Review about 5 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

Actions #8

Updated by Andreas Fernandez about 5 years ago

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

Updated by Christian Eßl about 5 years ago

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

Updated by Markus Klein about 5 years ago

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

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF