Skip to content

Commit 2948707

Browse files
committed
Throw exception if child element is not iterable
1 parent e3ecbc0 commit 2948707

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

FormErrorIterator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ public function hasChildren(): bool
190190
public function getChildren(): self
191191
{
192192
if (!$this->hasChildren()) {
193-
trigger_deprecation('symfony/form', '5.4', 'Calling "%s()" if the current element is not iterable is deprecated, call "%s" to get the current element.', __METHOD__, self::class.'::current()');
194-
// throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
193+
throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
195194
}
196195

197196
return current($this->errors);

0 commit comments

Comments
 (0)