Skip to content

Commit

Permalink
Make sure data is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh authored Apr 21, 2018
1 parent 9817f1f commit b564d44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Extension/Validation/ValidationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function validateRules(FormEvent $event)
if ($event->getForm()->isRoot()) {
$root = $event->getForm();
$rules = $this->findRules($root);
$validator = $this->validator->make($this->data, $rules);
$validator = $this->validator->make($this->data ?: [], $rules);

if ($validator->fails()) {
// Add all messages to the original name
Expand Down

0 comments on commit b564d44

Please sign in to comment.