diff --git a/source/php/Module/EventForm/EventForm.php b/source/php/Module/EventForm/EventForm.php index c2242ded..3edc7e7d 100644 --- a/source/php/Module/EventForm/EventForm.php +++ b/source/php/Module/EventForm/EventForm.php @@ -55,7 +55,10 @@ private function validateFields(array $fields) if (!file_exists($schemaFilePath)) { continue; } - $this->validator->validate(json_decode(json_encode($field)), (object)['$ref' => 'file://' . realpath($schemaFilePath)]); + + $fieldAsAssocArray = json_decode(json_encode($field)); + + $this->validator->validate($fieldAsAssocArray, (object)['$ref' => 'file://' . realpath($schemaFilePath)]); if (!$this->validator->isValid()) { echo "JSON does not validate. Violations:\n"; foreach ($this->validator->getErrors() as $error) {