From a4120bbc60cd9cb688bd3d0dc47c10d265f194b9 Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Fri, 1 Mar 2019 12:48:14 +0100 Subject: [PATCH] Fix --- ValidatorBundle/Validator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ValidatorBundle/Validator.php b/ValidatorBundle/Validator.php index b7f4ffc..eb3ab03 100644 --- a/ValidatorBundle/Validator.php +++ b/ValidatorBundle/Validator.php @@ -84,10 +84,10 @@ class Validator { $errors = []; - foreach ($this->errors as $field => $error) + foreach ($this->errors as $field => $field_errors) { $errors[$field] = [ - 'error' => "validator.".$errors[0].(!is_null($this->context) ? ':'.$this->context : '') + 'error' => "validator.".$field_errors[0].(!is_null($this->context) ? ':'.$this->context : '') ]; }