mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Added file_exists check to SplClassLoader
This commit is contained in:
parent
5052e58bd0
commit
5da68059ee
@ -140,7 +140,13 @@ class SplClassLoader implements SplAutoloader{
|
|||||||
|
|
||||||
case ($this->mode & self::MODE_NORMAL):
|
case ($this->mode & self::MODE_NORMAL):
|
||||||
default:
|
default:
|
||||||
|
if(!file_exists($resourceAbsolutePath)){
|
||||||
|
throw new \RuntimeException(
|
||||||
|
sprintf('Autoloader expected in file "%s" to exist.', $resourceAbsolutePath)
|
||||||
|
);
|
||||||
|
}else{
|
||||||
require $resourceAbsolutePath;
|
require $resourceAbsolutePath;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user