Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 84163e5

Browse filesBrowse files
authored
Use in_array() for check argument type
1 parent c05348e commit 84163e5
Copy full SHA for 84163e5

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function onControllerArguments(ControllerArgumentsEvent $event)
9999
$r = new \ReflectionFunction(\Closure::fromCallable($event->getController()));
100100
$r = $r->getParameters()[$k] ?? null;
101101

102-
if ($r && (!$r->hasType() || FlattenException::class === $r->getType()->getName() || LegacyFlattenException::class === $r->getType()->getName())) {
102+
if ($r && (!$r->hasType() || \in_array($r->getType()->getName(), [FlattenException::class, LegacyFlattenException::class], true])) {
103103
$arguments = $event->getArguments();
104104
$arguments[$k] = FlattenException::createFromThrowable($e);
105105
$event->setArguments($arguments);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.