mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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):
|
||||
default:
|
||||
require $resourceAbsolutePath;
|
||||
if(!file_exists($resourceAbsolutePath)){
|
||||
throw new \RuntimeException(
|
||||
sprintf('Autoloader expected in file "%s" to exist.', $resourceAbsolutePath)
|
||||
);
|
||||
}else{
|
||||
require $resourceAbsolutePath;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user