Skip to content

Commit 8bf2766

Browse files
committed
[ErrorHandler] Fix patch return type
1 parent 643745f commit 8bf2766

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,8 @@ private function setReturnType(string $types, string $class, string $method, str
868868
}
869869

870870
if (!preg_match('/^(?:\\\\?[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)+$/', $n)) {
871-
// exclude any invalid PHP class name (e.g. `Cookie::SAMESITE_*`)
872-
continue;
871+
// avoid changing return type if there is any invalid PHP class name (e.g. `Cookie::SAMESITE_*`)
872+
return;
873873
}
874874

875875
if (!isset($phpTypes[''])) {

0 commit comments

Comments
 (0)