Skip to content

Commit fa407eb

Browse files
calcinaibighappyface
authored andcommitted
Updated to check that is not an object (#314)
1 parent 26605ef commit fa407eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSchema/SchemaStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function resolveRef($ref)
9898
*/
9999
public function resolveRefSchema($refSchema)
100100
{
101-
if (is_object($refSchema) && property_exists($refSchema, '$ref')) {
101+
if (is_object($refSchema) && property_exists($refSchema, '$ref') && is_string($refSchema->{'$ref'})) {
102102
$newSchema = $this->resolveRef($refSchema->{'$ref'});
103103
$refSchema = (object) (get_object_vars($refSchema) + get_object_vars($newSchema));
104104
unset($refSchema->{'$ref'});

0 commit comments

Comments
 (0)