fix remove_callback
This commit is contained in:
parent
b2c656840c
commit
28951fdeb1
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue