From 2ad5de379f3c6a2f4be5686dbe546045fa6023a6 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 10 Aug 2021 15:28:11 +0100 Subject: [PATCH] HandlerListManager::unregisterAll() accepts RegisteredListener since all this function is doing is passing the object on to the HandlerList, it should accept RegisteredListener, like HandlerList::unregister(). --- src/event/HandlerListManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event/HandlerListManager.php b/src/event/HandlerListManager.php index 3bed7631c..0859b1e5e 100644 --- a/src/event/HandlerListManager.php +++ b/src/event/HandlerListManager.php @@ -42,10 +42,10 @@ class HandlerListManager{ * Unregisters all the listeners * If a Plugin or Listener is passed, all the listeners with that object will be removed * - * @param Plugin|Listener|null $object + * @param Plugin|Listener|RegisteredListener|null $object */ public function unregisterAll($object = null) : void{ - if($object instanceof Listener or $object instanceof Plugin){ + if($object instanceof Listener or $object instanceof Plugin or $object instanceof RegisteredListener){ foreach($this->allLists as $h){ $h->unregister($object); }