From 21fd5c448dde6f5453037bcce27270ae28ad180f Mon Sep 17 00:00:00 2001 From: Redouane Date: Thu, 6 Oct 2022 20:41:45 +0100 Subject: [PATCH] Correction FormErrorIterator.php fixed return value of symfony 'current' function, because php native 'current' function may return 'false' with empty array --- FormErrorIterator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FormErrorIterator.php b/FormErrorIterator.php index ae265cf59..24047fc15 100644 --- a/FormErrorIterator.php +++ b/FormErrorIterator.php @@ -99,7 +99,7 @@ public function getForm(): FormInterface * * @return T An error or an iterator containing nested errors */ - public function current(): FormError|self + public function current(): FormError|self|bool { return current($this->errors); }