Skip to content

Commit 5a49ebd

Browse files
committed
Merge pull request #237 from tinyroy/master
Aligning EnumConstraint error output to use json_encode()
2 parents 37810e9 + dd80ff0 commit 5a49ebd

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)