Skip to content

Commit f7defd0

Browse files
Merge branch '4.4'
* 4.4: fix merge Fix inconsistent return points. pass translation parameters to the trans filter [Mime] fixed wrong mimetype [ProxyManagerBridge] Polyfill for unmaintained version [HttpClient] Declare `$active` first to prevent weird issue Remove deprecated assertContains [HttpClient] fix tests SCA: dropped unused mocks, duplicate import and a function alias usage Added correct plural for box -> boxes [Config] fix test Fix remaining tests fix getName() when transport is null [Console] Check for ErrorHandler classes Improve fa (persian) translation
2 parents ac32879 + d74f460 commit f7defd0

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
@@ -55,7 +55,7 @@ public function remove(string $name)
5555
$target = &$this->fields;
5656
while (\count($segments) > 1) {
5757
$path = array_shift($segments);
58-
if (!\array_key_exists($path, $target)) {
58+
if (!\is_array($target) || !\array_key_exists($path, $target)) {
5959
return;
6060
}
6161
$target = &$target[$path];
@@ -76,7 +76,7 @@ public function &get(string $name)
7676
$target = &$this->fields;
7777
while ($segments) {
7878
$path = array_shift($segments);
79-
if (!\array_key_exists($path, $target)) {
79+
if (!\is_array($target) || !\array_key_exists($path, $target)) {
8080
throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path));
8181
}
8282
$target = &$target[$path];

0 commit comments

Comments
 (0)