Skip to content

Commit 92a71f3

Browse files
[Debug] Remove false-positive check in DebugClassLoader
1 parent 3ba4112 commit 92a71f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Debug/DebugClassLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function loadClass($class)
166166
try {
167167
if ($this->isFinder) {
168168
if ($file = $this->classLoader[0]->findFile($class)) {
169-
require_once $file;
169+
$firstTime = 1 === require_once $file;
170170
}
171171
} else {
172172
call_user_func($this->classLoader, $class);
@@ -234,6 +234,9 @@ public function loadClass($class)
234234

235235
if ($file) {
236236
if (!$exists) {
237+
if (!$firstTime) {
238+
return;
239+
}
237240
if (false !== strpos($class, '/')) {
238241
throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
239242
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy