fix remove_callback

This commit is contained in:
Amberstone 2024-09-29 09:22:07 +09:00
parent b2c656840c
commit 28951fdeb1
Signed by: amber
GPG key ID: 094B0E55F98D8BF1

View file

@ -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;
}
}