Skip to content

Commit 9ae38ff

Browse files
IsraelOrtunosileence
authored andcommitted
No need to check for "["
str_replace will do the same operation
1 parent 96c8682 commit 9ae38ff

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/FieldBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,7 @@ protected function getControlErrors($name)
640640
if ($errors = $this->session->get('errors')) {
641641

642642
// Replaces to get errors on nested fields
643-
if (strpos($name, "[")) {
644-
$name = str_replace(['[', ']'], ['.', ''], $name);
645-
}
643+
$name = str_replace(['[', ']'], ['.', ''], $name);
646644

647645
return $errors->get($name, []);
648646
}

0 commit comments

Comments
 (0)