diff --git a/webfiori/framework/autoload/AutoLoader.php b/webfiori/framework/autoload/AutoLoader.php index 24adac1cc..2254bc87f 100644 --- a/webfiori/framework/autoload/AutoLoader.php +++ b/webfiori/framework/autoload/AutoLoader.php @@ -694,7 +694,7 @@ public static function isValidNamespace(string $ns) { } private function createNSFromPath(string $filePath, string $className) { $split = explode(DIRECTORY_SEPARATOR, $filePath); - $nsArr = []; + $nsArr = ['\\'.$className]; $currentNs = ''; foreach ($split as $str) { if (self::isValidNamespace($str)) {