diff options
| author | Ben Fuhrmannek | 2021-08-07 19:58:24 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-08-07 19:58:24 +0200 |
| commit | 26a33c19d6ac5322c69e825d623332c1d32e4af8 (patch) | |
| tree | e661af8fe6d5f0f0469b06b0eaca03742fbf1904 /src/sp_utils.c | |
| parent | 5f0deb5a03ab26e2b1493244aa2beb4ca07f6a9f (diff) | |
fixed doulbe hook
Diffstat (limited to 'src/sp_utils.c')
| -rw-r--r-- | src/sp_utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c index af78d20..7ec98cf 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -398,6 +398,9 @@ bool /* success */ _hook_function(const char* original_name, HashTable* hook_tab | |||
| 398 | if (func->type != ZEND_INTERNAL_FUNCTION) { | 398 | if (func->type != ZEND_INTERNAL_FUNCTION) { |
| 399 | return false; | 399 | return false; |
| 400 | } | 400 | } |
| 401 | if (func->internal_function.handler == new_function) { | ||
| 402 | return true; | ||
| 403 | } | ||
| 401 | if (zend_hash_str_add_new_ptr((hook_table), VAR_AND_LEN(original_name), | 404 | if (zend_hash_str_add_new_ptr((hook_table), VAR_AND_LEN(original_name), |
| 402 | func->internal_function.handler) == NULL) { | 405 | func->internal_function.handler) == NULL) { |
| 403 | // LCOV_EXCL_START | 406 | // LCOV_EXCL_START |
