From 4e5b0af0413e787577117984cc15999060859313 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 18 Nov 2018 15:59:37 +0100 Subject: Minor code clarification --- src/sp_disabled_functions.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 217c6f0..f597feb 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -545,9 +545,11 @@ static int hook_functions(HashTable* to_hook_ht, HashTable* hooked_ht) { zval* value; ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { - if (!HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, - PHP_FN(check_disabled_function)) || - check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data)) { + bool hooked = !HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, + PHP_FN(check_disabled_function)); + bool is_builtin = + check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data); + if (hooked || is_builtin) { zend_symtable_add_new(hooked_ht, key, value); zend_hash_del(to_hook_ht, key); } -- cgit v1.3