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 92a71f3

Browse filesBrowse files
[Debug] Remove false-positive check in DebugClassLoader
1 parent 3ba4112 commit 92a71f3
Copy full SHA for 92a71f3

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

‎src/Symfony/Component/Debug/DebugClassLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/DebugClassLoader.php
+4-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.