diff options
| author | jvoisin | 2018-11-18 15:59:37 +0100 |
|---|---|---|
| committer | jvoisin | 2018-11-18 15:59:37 +0100 |
| commit | 4e5b0af0413e787577117984cc15999060859313 (patch) | |
| tree | 50903d0c0a22c10b62f7499860dcc3b2c09d8398 /src/sp_disabled_functions.c | |
| parent | 6075f6b13b4b37cc1a5c35fd8c84f83c9ba49aa6 (diff) | |
Minor code clarification
Diffstat (limited to 'src/sp_disabled_functions.c')
| -rw-r--r-- | src/sp_disabled_functions.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) { | |||
| 545 | zval* value; | 545 | zval* value; |
| 546 | 546 | ||
| 547 | ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { | 547 | ZEND_HASH_FOREACH_STR_KEY_VAL(to_hook_ht, key, value) { |
| 548 | if (!HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, | 548 | bool hooked = !HOOK_FUNCTION(ZSTR_VAL(key), disabled_functions_hook, |
| 549 | PHP_FN(check_disabled_function)) || | 549 | PHP_FN(check_disabled_function)); |
| 550 | check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data)) { | 550 | bool is_builtin = |
| 551 | check_is_builtin_name(((sp_list_node*)Z_PTR_P(value))->data); | ||
| 552 | if (hooked || is_builtin) { | ||
| 551 | zend_symtable_add_new(hooked_ht, key, value); | 553 | zend_symtable_add_new(hooked_ht, key, value); |
| 552 | zend_hash_del(to_hook_ht, key); | 554 | zend_hash_del(to_hook_ht, key); |
| 553 | } | 555 | } |
