From 26a33c19d6ac5322c69e825d623332c1d32e4af8 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Sat, 7 Aug 2021 19:58:24 +0200 Subject: fixed doulbe hook --- src/sp_utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sp_utils.c') 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 if (func->type != ZEND_INTERNAL_FUNCTION) { return false; } + if (func->internal_function.handler == new_function) { + return true; + } if (zend_hash_str_add_new_ptr((hook_table), VAR_AND_LEN(original_name), func->internal_function.handler) == NULL) { // LCOV_EXCL_START -- cgit v1.3