mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
ScriptPluginLoader: properly handle the case where the script itself is somehow missing
this won't ever happen during PocketMine runtime, but it might happen if something else tries to use it.
This commit is contained in:
parent
cdda74ef93
commit
0a3788f9ac
@ -55,7 +55,10 @@ class ScriptPluginLoader implements PluginLoader{
|
||||
* Gets the PluginDescription from the file
|
||||
*/
|
||||
public function getPluginDescription(string $file) : ?PluginDescription{
|
||||
$content = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
$content = @file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
if($content === false){
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user