fix not existing component issue in admin panels login controller

This commit is contained in:
2022-08-15 15:44:51 +02:00
parent 4b47e5ddb6
commit ff606efef3
2 changed files with 41 additions and 30 deletions

View File

@ -36,7 +36,6 @@ class DebugBarExceptionHandler
*/
public function handleUncaughtException(Throwable $exception)
{
//dumpvar(__METHOD__.__LINE__);
try {
$debugMode = (bool) \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('iDebug');
$defaultExceptionHandler = new ExceptionHandler($debugMode);
@ -56,11 +55,9 @@ class DebugBarExceptionHandler
}
global $debugBarSet;
if ($debugBarSet !== 1) {
/** @var FrontendController $activeView */
$activeView = Registry::getConfig()->getTopActiveView();
/** @var DebugBarComponent|null $debugBarComponent */
$debugBarComponent = $activeView->getComponent(DebugBarComponent::class) ?: oxNew(DebugBarComponent::class);
if ($debugBarSet !== 1 && false === isAdmin()) {
/** @var DebugBarComponent $debugBarComponent */
$debugBarComponent = oxNew( DebugBarComponent::class );
/** @var ExceptionsCollector $excCollector */
$excCollector = $debugBarComponent->getDebugBar()->getCollector('exceptions');