Skip to content

Commit d1c8351

Browse files
Merge branch '2.6' into 2.7
* 2.6: Add test for HHVM FatalErrors [2.6][Debug] Fix fatal-errors handling on HHVM [2.3][Debug] Fix fatal-errors handling on HHVM Standardize the name of the exception variables [2.3] Static Code Analysis for Components Remove duplicated paths Conflicts: src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php src/Symfony/Component/Security/Http/Firewall/ContextListener.php src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php
2 parents a1f5da4 + 0f97a88 commit d1c8351

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

Definition/ArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ protected function finalizeValue($value)
246246

247247
try {
248248
$value[$name] = $child->finalize($value[$name]);
249-
} catch (UnsetKeyException $unset) {
249+
} catch (UnsetKeyException $e) {
250250
unset($value[$name]);
251251
}
252252
}

Definition/BaseNode.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,10 @@ final public function finalize($value)
307307
foreach ($this->finalValidationClosures as $closure) {
308308
try {
309309
$value = $closure($value);
310-
} catch (Exception $correctEx) {
311-
throw $correctEx;
312-
} catch (\Exception $invalid) {
313-
throw new InvalidConfigurationException(sprintf(
314-
'Invalid configuration for path "%s": %s',
315-
$this->getPath(),
316-
$invalid->getMessage()
317-
), $invalid->getCode(), $invalid);
310+
} catch (Exception $e) {
311+
throw $e;
312+
} catch (\Exception $e) {
313+
throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": %s', $this->getPath(), $e->getMessage()), $e->getCode(), $e);
318314
}
319315
}
320316

Definition/PrototypedArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected function finalizeValue($value)
197197
$this->prototype->setName($k);
198198
try {
199199
$value[$k] = $this->prototype->finalize($v);
200-
} catch (UnsetKeyException $unset) {
200+
} catch (UnsetKeyException $e) {
201201
unset($value[$k]);
202202
}
203203
}

FileLocator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function locate($name, $currentPath = null, $first = true)
5353
array_unshift($paths, $currentPath);
5454
}
5555

56+
$paths = array_unique($paths);
5657
$filepaths = array();
5758

5859
foreach ($paths as $path) {
@@ -68,7 +69,7 @@ public function locate($name, $currentPath = null, $first = true)
6869
throw new \InvalidArgumentException(sprintf('The file "%s" does not exist (in: %s).', $name, implode(', ', $paths)));
6970
}
7071

71-
return array_values(array_unique($filepaths));
72+
return $filepaths;
7273
}
7374

7475
/**

0 commit comments

Comments
 (0)