mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-30 06:55:11 +00:00
PluginManager: explicitly assume the result of FilesystemIterator arrayification
This commit is contained in:
parent
0a3788f9ac
commit
959dd4cbf1
@ -37,6 +37,7 @@ use pocketmine\permission\Permission;
|
|||||||
use pocketmine\permission\PermissionManager;
|
use pocketmine\permission\PermissionManager;
|
||||||
use pocketmine\Server;
|
use pocketmine\Server;
|
||||||
use pocketmine\timings\TimingsHandler;
|
use pocketmine\timings\TimingsHandler;
|
||||||
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use pocketmine\utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use function array_intersect;
|
use function array_intersect;
|
||||||
use function array_map;
|
use function array_map;
|
||||||
@ -229,6 +230,7 @@ class PluginManager{
|
|||||||
shuffle($files); //this prevents plugins implicitly relying on the filesystem name order when they should be using dependency properties
|
shuffle($files); //this prevents plugins implicitly relying on the filesystem name order when they should be using dependency properties
|
||||||
foreach($loaders as $loader){
|
foreach($loaders as $loader){
|
||||||
foreach($files as $file){
|
foreach($files as $file){
|
||||||
|
if(!is_string($file)) throw new AssumptionFailedError("FilesystemIterator current should be string when using CURRENT_AS_PATHNAME");
|
||||||
if(!$loader->canLoadPlugin($file)){
|
if(!$loader->canLoadPlugin($file)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user