diff --git a/Modules/Core/ViewConfig.php b/Modules/Core/ViewConfig.php index 6e9fc16..b6c5bb3 100644 --- a/Modules/Core/ViewConfig.php +++ b/Modules/Core/ViewConfig.php @@ -162,7 +162,7 @@ class ViewConfig extends ViewConfig_parent $oConfig = Registry::getConfig(); $oView = $oConfig->getTopActiveView(); - /** @var User $oUser */ + /** @var User|false|null $oUser */ $oUser = $oConfig->getUser(); $cl = $this->getTopActiveClassName(); @@ -185,7 +185,7 @@ class ViewConfig extends ViewConfig_parent 'title' => $oView->getTitle(), 'cl' => $cl, ], - 'userid' => is_bool($oUser) ? false : $oUser->getId(), + 'userid' => $oUser instanceof User ? $oUser->getId() : false, 'sessionid' => session_id(), //'httpref' => $_SERVER["HTTP_REFERER"] ?? "unknown" ]; diff --git a/phpstan.neon b/phpstan.neon index 20275c7..6ade348 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,7 +8,7 @@ parameters: - ../../../../Shops/CE/6.1.x/616_/vendor/oxid-esales ignoreErrors: - '#.*is not subtype of Throwable.*#' - - '#Parameter \#2 \$sValue of method OxidEsales\\EshopCommunity\\Core\\Controller\\BaseController::addTplParam\(\) expects string, true given#' + - '#\$sValue of method OxidEsales\\EshopCommunity\\Core\\Controller\\BaseController::addTplParam\(\) expects string,[ a-zA-Z\.]+#' paths: - ./ level: 5