check for not existing controller function
Dieser Commit ist enthalten in:
Ursprung
75146c8a08
Commit
4c21a850d8
@ -49,7 +49,9 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
||||
if (AvailabilityCheck::isAvailable() && AvailabilityCheck::ifDebugBarNotSet() && AvailabilityCheck::ifNoErrorOccured()) {
|
||||
$activeView = Registry::getConfig()->getTopActiveView();
|
||||
/** @var DebugBarComponent|null $debugBarComponent */
|
||||
$debugBarComponent = $activeView->getComponent(DebugBarComponent::class);
|
||||
$debugBarComponent = method_exists($activeView, 'getComponent')
|
||||
? $activeView->getComponent(DebugBarComponent::class)
|
||||
: null;
|
||||
if ($debugBarComponent) {
|
||||
AvailabilityCheck::markDebugBarAsSet();
|
||||
echo $debugBarComponent->getRenderer()->renderHead();
|
||||
|
@ -97,7 +97,9 @@ function debugVar($mVar, bool $blToFile = false): void
|
||||
}
|
||||
$activeView = Registry::getConfig()->getTopActiveView();
|
||||
/** @var DebugBarComponent|null $debugBarComponent */
|
||||
$debugBarComponent = $activeView->getComponent(DebugBarComponent::class);
|
||||
$debugBarComponent = method_exists($activeView, 'getComponent')
|
||||
? $activeView->getComponent(DebugBarComponent::class)
|
||||
: null;
|
||||
if ($debugBarComponent === null) {
|
||||
throw new UnavailableException();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren