Skip to content

Commit fa55758

Browse files
committed
Fix remaining tests
1 parent 029914a commit fa55758

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FormFieldRegistry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function remove($name)
5757
$target = &$this->fields;
5858
while (\count($segments) > 1) {
5959
$path = array_shift($segments);
60-
if (!\array_key_exists($path, $target)) {
60+
if (!\is_array($target) || !\array_key_exists($path, $target)) {
6161
return;
6262
}
6363
$target = &$target[$path];
@@ -80,7 +80,7 @@ public function &get($name)
8080
$target = &$this->fields;
8181
while ($segments) {
8282
$path = array_shift($segments);
83-
if (!\array_key_exists($path, $target)) {
83+
if (!\is_array($target) || !\array_key_exists($path, $target)) {
8484
throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path));
8585
}
8686
$target = &$target[$path];

0 commit comments

Comments
 (0)