Merge pull request #17665 from frederic34/patch-4

Fix issue when loading external libs (pb with autoloader conflict and luracast)
This commit is contained in:
Laurent Destailleur 2021-05-20 14:06:27 +02:00 committed by GitHub
commit 854292b77e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,7 +263,7 @@ class AutoLoader
* @return bool false unless className now exists
*/
private function loadLastResort($className, $loader = null) {
$loaders = array_unique(static::$rogueLoaders);
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
if (isset($loader)) {
if (false === array_search($loader, $loaders))
static::$rogueLoaders[] = $loader;