10000 [Form][BUG]Button missing getErrorsAsString() fixes #8084 · mikeSimonson/symfony@9550755 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9550755

Browse files
committed
[Form][BUG]Button missing getErrorsAsString() fixes symfony#8084
Debug: Not calling undefined method anymore. If the form contained a submit button the call would fail and the debug of the form wasn't possible. Now it will work in all cases. This fixes symfony#8084
1 parent 35bdf82 commit 9550755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ public function getErrorsAsString($level = 0)
747747

748748
foreach ($this->children as $key => $child) {
749749
$errors .= str_repeat(' ', $level).$key.":\n";
750-
if ($err = $child->getErrorsAsString($level + 4)) {
750+
if ($child instanceof self && $err = $child->getErrorsAsString($level + 4)) {
751751
$errors .= $err;
752752
} else {
753753
$errors .= str_repeat(' ', $level + 4)."No errors\n";

0 commit comments

Comments
 (0)
0