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