mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-21 13:58:42 +00:00
fix tests
This commit is contained in:
parent
4327536119
commit
513a1df1dc
|
|
@ -35,6 +35,7 @@ class Autoloader
|
|||
private static $paths = [
|
||||
__DIR__ . '/../',
|
||||
__DIR__ . '/../../',
|
||||
__DIR__ . '/../MainRepository/',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -82,9 +83,12 @@ class Autoloader
|
|||
}
|
||||
|
||||
$class2 = $class;
|
||||
$class3 = $class;
|
||||
|
||||
$pos = \stripos($class, '/');
|
||||
if ($pos !== false) {
|
||||
$class3 = \substr($class, $pos + 1);
|
||||
|
||||
$pos = \stripos($class, '/', $pos + 1);
|
||||
|
||||
if ($pos !== false) {
|
||||
|
|
@ -93,7 +97,7 @@ class Autoloader
|
|||
}
|
||||
|
||||
foreach (self::$paths as $path) {
|
||||
if (\is_file($file = $path . $class2 . '.php')) {
|
||||
if (\is_file($file = $path . $class2 . '.php') && \stripos($file, $class3) !== false) {
|
||||
include_once $file;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user