comparison vendor/symfony/dom-crawler/FormFieldRegistry.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
55 { 55 {
56 $segments = $this->getSegments($name); 56 $segments = $this->getSegments($name);
57 $target = &$this->fields; 57 $target = &$this->fields;
58 while (\count($segments) > 1) { 58 while (\count($segments) > 1) {
59 $path = array_shift($segments); 59 $path = array_shift($segments);
60 if (!array_key_exists($path, $target)) { 60 if (!\array_key_exists($path, $target)) {
61 return; 61 return;
62 } 62 }
63 $target = &$target[$path]; 63 $target = &$target[$path];
64 } 64 }
65 unset($target[array_shift($segments)]); 65 unset($target[array_shift($segments)]);
78 { 78 {
79 $segments = $this->getSegments($name); 79 $segments = $this->getSegments($name);
80 $target = &$this->fields; 80 $target = &$this->fields;
81 while ($segments) { 81 while ($segments) {
82 $path = array_shift($segments); 82 $path = array_shift($segments);
83 if (!array_key_exists($path, $target)) { 83 if (!\array_key_exists($path, $target)) {
84 throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path)); 84 throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path));
85 } 85 }
86 $target = &$target[$path]; 86 $target = &$target[$path];
87 } 87 }
88 88