Skip to content

Commit c70a468

Browse files
[Debug] sync with deprecation in DebugClassLoader
1 parent 6586eaa commit c70a468

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,17 @@ private function getClassCandidates($class)
103103
}
104104

105105
// get class loaders wrapped by DebugClassLoader
106-
if ($function[0] instanceof DebugClassLoader && method_exists($function[0], 'getClassLoader')) {
107-
$function[0] = $function[0]->getClassLoader();
106+
if ($function[0] instanceof DebugClassLoader) {
107+
$function = $function[0]->getClassLoader();
108+
109+
// Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated
110+
if (is_object($function)) {
111+
$function = array($function);
112+
}
113+
114+
if (!is_array($function)) {
115+
continue;
116+
}
108117
}
109118

110119
if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) {

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