diff --git a/wire/core/HookEvent.php b/wire/core/HookEvent.php index fd816567..91874e4d 100644 --- a/wire/core/HookEvent.php +++ b/wire/core/HookEvent.php @@ -207,12 +207,12 @@ class HookEvent extends WireData { * $event->removeHook(null); * ~~~~~ * - * @param string|null $hookId + * @param string|HookEvent|null $hookId * @return HookEvent|WireData $this * */ public function removeHook($hookId) { - if(empty($hookId)) { + if(empty($hookId) || $hookId === $this) { if($this->object && $this->id) { $this->object->removeHook($this->id); }