From dd80ff05859d58495d65cdc30b56747eebcb00f5 Mon Sep 17 00:00:00 2001 From: Royston Tong Date: Sat, 27 Feb 2016 18:57:30 +0000 Subject: [PATCH] Aligning error output to use json_encode() instead of print_r() when displaying objects or arrays in error message. --- src/JsonSchema/Constraints/EnumConstraint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonSchema/Constraints/EnumConstraint.php b/src/JsonSchema/Constraints/EnumConstraint.php index df413e4..96b9e5a 100644 --- a/src/JsonSchema/Constraints/EnumConstraint.php +++ b/src/JsonSchema/Constraints/EnumConstraint.php @@ -41,6 +41,6 @@ class EnumConstraint extends Constraint } } - $this->addError($path, "Does not have a value in the enumeration " . print_r($schema->enum, true), 'enum', array('enum' => $schema->enum,)); + $this->addError($path, "Does not have a value in the enumeration " . json_encode($schema->enum), 'enum', array('enum' => $schema->enum,)); } }