Skip to content

Commit 010f25e

Browse files
committed
fix deprecation warning on PHP 8.1
1 parent c4003e8 commit 010f25e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ private function processType(\ReflectionClass $class, \Laminas\Code\Reflection\P
110110

111111
$type = $parameter->detectType();
112112

113-
if ($type === 'null') {
113+
if ($type === null || $type === 'null') {
114+
// check on null for PHP 8.1 compatibility, emulates the behavior from PHP 7.4
114115
return null;
115116
}
116117

0 commit comments

Comments
 (0)