Skip to content

Commit dd80ff0

Browse files
committed
Aligning error output to use json_encode() instead of print_r() when displaying objects or arrays in error message.
1 parent 37810e9 commit dd80ff0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSchema/Constraints/EnumConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public function check($element, $schema = null, $path = null, $i = null)
4141
}
4242
}
4343

44-
$this->addError($path, "Does not have a value in the enumeration " . print_r($schema->enum, true), 'enum', array('enum' => $schema->enum,));
44+
$this->addError($path, "Does not have a value in the enumeration " . json_encode($schema->enum), 'enum', array('enum' => $schema->enum,));
4545
}
4646
}

0 commit comments

Comments
 (0)