#91407Pagetree not shown due to error in TYPO3\CMS\Backend\Controller\Page\TreeController
Description
After updating to 9.5.17 the pagetree is no longer shown due to the following error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Cannot use object of type __PHP_Incomplete_Class as array | Error thrown in file typo3/sysext/backend/Classes/Controller/Page/TreeController.php in line 189
I could track the error down to the following:
$this->expandedState is an object but $this->expandedState->stateHash is not. Thus the condition in Line 186 results in false, leading to the assumption that $this->expandedState is an array. Which it is not and trying to retrieve stateHash via $this->expandedState[‘stateHash’] results in the mentioned error.
For my two systems removing is_object($this->expandedState->stateHash) from the condition worked but I have no idea whether this is a valid solution for everyone.
I’m guessing not, as the second part to the condition was added in https://github.com/TYPO3/TYPO3.CMS/commit/2a42940d6b21f9e134879c33b99a315953aa6742
Also, I have no idea why this issue didn’t occur in versions between 9.5.1 and 9.5.17.