Skip to content

Commit 958ed4f

Browse files
Merge branch 'MAGETWO-95945' into 2.3-bugfixes-020119
2 parents 5cbbd62 + eb3fb1a commit 958ed4f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ private function isControllerPlugin(\ReflectionClass $class): bool
8282
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
8383
continue;
8484
}
85-
$isAction = $argument->isSubclassOf(\Magento\Framework\App\ActionInterface::class)
86-
|| $argument->getName() === \Magento\Framework\App\ActionInterface::class;
87-
if ($isAction) {
88-
return true;
85+
if ($argument) {
86+
$isAction = $argument->isSubclassOf(\Magento\Framework\App\ActionInterface::class)
87+
|| $argument->getName() === \Magento\Framework\App\ActionInterface::class;
88+
if ($isAction) {
89+
return true;
90+
}
8991
}
9092
}
9193
}
@@ -109,10 +111,12 @@ private function isBlockPlugin(\ReflectionClass $class): bool
109111
//Non-existing class (autogenerated perhaps) or doesn't have an argument.
110112
continue;
111113
}
112-
$isBlock = $argument->isSubclassOf(\Magento\Framework\View\Element\BlockInterface::class)
113-
|| $argument->getName() === \Magento\Framework\View\Element\BlockInterface::class;
114-
if ($isBlock) {
115-
return true;
114+
if ($argument) {
115+
$isBlock = $argument->isSubclassOf(\Magento\Framework\View\Element\BlockInterface::class)
116+
|| $argument->getName() === \Magento\Framework\View\Element\BlockInterface::class;
117+
if ($isBlock) {
118+
return true;
119+
}
116120
}
117121
}
118122
}

0 commit comments

Comments
 (0)