Update AutoLoader.php

This commit is contained in:
Frédéric FRANCE 2021-05-18 21:04:43 +02:00 committed by GitHub
parent 4d42235670
commit dffb244776
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;