mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
next fix for #17665 : autoloader collision
This commit is contained in:
parent
887d0a5d01
commit
40329db2b2
|
|
@ -290,10 +290,14 @@ class AutoLoader
|
|||
if (is_array($loader)
|
||||
&& is_callable($loader)) {
|
||||
$b = new $loader[0];
|
||||
if (false !== $file = $b::$loader[1]($className)
|
||||
&& $this->exists($className, $b::$loader[1])) {
|
||||
return $file;
|
||||
}
|
||||
//avoid PHP Fatal error: Uncaught Error: Access to undeclared static property: Composer\\Autoload\\ClassLoader::$loader
|
||||
//in case of multiple autoloader systems
|
||||
if(property_exists($b, $loader[1])) {
|
||||
if (false !== $file = $b::$loader[1]($className)
|
||||
&& $this->exists($className, $b::$loader[1])) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
} elseif (is_callable($loader)
|
||||
&& false !== $file = $loader($className)
|
||||
&& $this->exists($className, $loader)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user