#41593PHP Fatal error: Call to undefined method stdClass::isAdminPanelVisible()
Description
If no Backend session exists I get this PHP error:
PHP Fatal error: Call to undefined method stdClass::isAdminPanelVisible() in /var/www/…/typo3/sysext/cms/tslib/index_ts.php on line 578
Line 578 in Version 4.5.x
Line 506 in Version 4.6.x
Line 474 in Version 4.7.x
The affected code looks like this:
if (is_object($BE_USER) && $BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) {
$TSFE->content = str_ireplace('</head>', $BE_USER->adminPanel->getAdminPanelHeaderData() . '</head>', $TSFE->content);
$TSFE->content = str_ireplace('</body>', $BE_USER->displayAdminPanel() . '</body>', $TSFE->content);
}
This is my patch after each TYPO3 Update:
if (is_object($BE_USER) && method_exists($BE_USER, 'isAdminPanelVisible')) {
if($BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) {
$TSFE->content = str_ireplace('</head>', $BE_USER->adminPanel->getAdminPanelHeaderData() . '</head>', $TSFE->content);
$TSFE->content = str_ireplace('</body>', $BE_USER->displayAdminPanel() . '</body>', $TSFE->content);
}
}
Only one of my 80 installations on the same server is affected and I could not find the reason why only this installation is affected.