mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Fixed various reentrant-unsafe 2D array element unsets (similar to previous commit)
this pattern was used in various places
This commit is contained in:
@ -510,9 +510,12 @@ class PluginManager{
|
||||
|
||||
unset($this->enabledPlugins[$plugin->getDescription()->getName()]);
|
||||
foreach(Utils::stringifyKeys($this->pluginDependents) as $dependency => $dependentList){
|
||||
unset($this->pluginDependents[$dependency][$plugin->getDescription()->getName()]);
|
||||
if(count($this->pluginDependents[$dependency]) === 0){
|
||||
unset($this->pluginDependents[$dependency]);
|
||||
if(isset($this->pluginDependents[$dependency][$plugin->getDescription()->getName()])){
|
||||
if(count($this->pluginDependents[$dependency]) === 1){
|
||||
unset($this->pluginDependents[$dependency]);
|
||||
}else{
|
||||
unset($this->pluginDependents[$dependency][$plugin->getDescription()->getName()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user