From 28951fdeb189c150e09bcbe9340ffbc531db4064 Mon Sep 17 00:00:00 2001 From: Arcturus Date: Sun, 29 Sep 2024 09:22:07 +0900 Subject: [PATCH] fix remove_callback --- AvocadoEdition_Light/lib/Hook/hook.extends.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AvocadoEdition_Light/lib/Hook/hook.extends.class.php b/AvocadoEdition_Light/lib/Hook/hook.extends.class.php index 341cfa4..45ea2eb 100644 --- a/AvocadoEdition_Light/lib/Hook/hook.extends.class.php +++ b/AvocadoEdition_Light/lib/Hook/hook.extends.class.php @@ -123,13 +123,15 @@ class GML_Hook extends Hook return false; } + $is_remove = false; + foreach ($array[$tag][$priority] as $key => $value) { if (isset($value['function']) && $value['function'] === $func) { unset($array[$tag][$priority][$key]); - return true; + $is_remove = true; } } - return false; + return $is_remove; } }