Aligning error output to use json_encode() instead of print_r() when displaying objects or arrays in error message.

This commit is contained in:
Royston Tong 2016-02-27 18:57:30 +00:00
parent 37810e922e
commit dd80ff0585

View File

@ -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,));
}
}