Skip to content

Commit af6accd

Browse files
authored
fix: property is passed as integer and cannot be accessed
1 parent 7660882 commit af6accd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSchema/Constraints/ObjectConstraint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected function &getProperty(&$element, $property, $fallback = null)
159159
{
160160
if (is_array($element) && (isset($element[$property]) || array_key_exists($property, $element)) /*$this->checkMode == self::CHECK_MODE_TYPE_CAST*/) {
161161
return $element[$property];
162-
} elseif (is_object($element) && property_exists($element, $property)) {
162+
} elseif (is_object($element) && property_exists($element, (string)$property)) {
163163
return $element->$property;
164164
}
165165

0 commit comments

Comments
 (0)