HOOK 이벤트 삭제 코드 오류 수정
This commit is contained in:
@ -130,10 +130,11 @@ Class GML_Hook extends Hook {
|
|||||||
|
|
||||||
if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) {
|
if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) {
|
||||||
|
|
||||||
$found_key = array_search($func, array_column($that->callback_filters[$tag][$priority], 'function'));
|
foreach((array) $that->callback_filters[$tag][$priority] as $key=>$value){
|
||||||
|
if(isset($value['function']) && $value['function'] === $func) {
|
||||||
if( $found_key !== false ){
|
unset($that->callback_filters[$tag][$priority][$key]);
|
||||||
unset($that->callback_filters[$tag][$priority][$found_key]);
|
$is_remove = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,10 +149,11 @@ Class GML_Hook extends Hook {
|
|||||||
|
|
||||||
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
|
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
|
||||||
|
|
||||||
$found_key = array_search($func, array_column($that->callbacks[$tag][$priority], 'function'));
|
foreach((array) $that->callbacks[$tag][$priority] as $key=>$value){
|
||||||
|
if(isset($value['function']) && $value['function'] === $func) {
|
||||||
if( $found_key !== false ){
|
unset($that->callbacks[$tag][$priority][$key]);
|
||||||
unset($that->callbacks[$tag][$priority][$found_key]);
|
$is_remove = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user