Skip to content

Commit b564d44

Browse files
authored
Make sure data is an array
1 parent 9817f1f commit b564d44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Extension/Validation/ValidationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function validateRules(FormEvent $event)
5656
if ($event->getForm()->isRoot()) {
5757
$root = $event->getForm();
5858
$rules = $this->findRules($root);
59-
$validator = $this->validator->make($this->data, $rules);
59+
$validator = $this->validator->make($this->data ?: [], $rules);
6060

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

0 commit comments

Comments
 (0)