diff --git a/.tools/phpstan/baseline.neon b/.tools/phpstan/baseline.neon index 0043cefb2b..1d52117850 100644 --- a/.tools/phpstan/baseline.neon +++ b/.tools/phpstan/baseline.neon @@ -70,11 +70,6 @@ parameters: count: 1 path: ../../redaxo/src/addons/structure/pages/index.php - - - message: "#^Variable \\$prevCtype in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../../redaxo/src/addons/structure/plugins/content/lib/article_content_base.php - - message: "#^Right side of && is always true\\.$#" count: 1 diff --git a/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php b/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php index 54864d3fe6..1841a8ec41 100644 --- a/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php +++ b/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php @@ -703,7 +703,7 @@ private function renderSlices(string $articleLimit, string $sliceLimit): void if ('edit' != $this->mode && !$this->eval) { if (0 == $i) { $articleContent = "ctype == '".$sliceCtypeId."' || \$this->ctype == '-1') {\n"; - } elseif (isset($prevCtype) && $sliceCtypeId != $prevCtype) { + } elseif (null !== $prevCtype && $sliceCtypeId != $prevCtype) { // ----- zwischenstand: ctype .. wenn ctype neu dann if $articleContent .= "}\n\nif (\$this->ctype == '".$sliceCtypeId."' || \$this->ctype == '-1') {\n"; }