Fixed Permissible::setPermission() not using the correct order on replacement

This commit is contained in:
Shoghi Cervantes
2014-09-11 12:17:03 +02:00
parent fba12c6ddf
commit 4624dfb472
3 changed files with 9 additions and 4 deletions

View File

@ -434,6 +434,9 @@ class PluginManager{
public function unsubscribeFromPermission($permission, Permissible $permissible){
if(isset($this->permSubs[$permission])){
unset($this->permSubs[$permission][spl_object_hash($permissible)]);
if(count($this->permSubs[$permission]) === 0){
unset($this->permSubs[$permission]);
}
}
}