Skip to content

Commit e69be44

Browse files
committed
Add missing method call for reflection class name
Without getName(), __toString() is triggered, which creates a string representation of the whole class and apparently also can lead to errors
1 parent ddc1b03 commit e69be44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Api/ExtensionAttributesFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function create($extensibleClassName, $data = [])
4949
$interfaceReflection = new \ReflectionClass($this->getExtensibleInterfaceName($extensibleClassName));
5050

5151
$methodReflection = $interfaceReflection->getMethod('getExtensionAttributes');
52-
if ($methodReflection->getDeclaringClass() == self::EXTENSIBLE_INTERFACE_NAME) {
52+
if ($methodReflection->getDeclaringClass()->getName() === self::EXTENSIBLE_INTERFACE_NAME) {
5353
throw new \LogicException(
5454
"Method 'getExtensionAttributes' must be overridden in the interfaces "
5555
. "which extend '" . self::EXTENSIBLE_INTERFACE_NAME . "'. "

0 commit comments

Comments
 (0)