diff options
Diffstat (limited to 'src/snuffleupagus.c')
| -rw-r--r-- | src/snuffleupagus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 3f9e1eb..ff0c6c3 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -265,12 +265,14 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 265 | // This is needed to implement the global strict mode | 265 | // This is needed to implement the global strict mode |
| 266 | CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; | 266 | CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; |
| 267 | } | 267 | } |
| 268 | if (zend_hash_str_find( | 268 | |
| 269 | // If `zend_write_default` is not NULL it is already hooked. | ||
| 270 | if ((zend_hash_str_find( | ||
| 269 | SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked, "echo", | 271 | SNUFFLEUPAGUS_G(config).config_disabled_functions_hooked, "echo", |
| 270 | strlen("echo")) || | 272 | strlen("echo")) || |
| 271 | zend_hash_str_find( | 273 | zend_hash_str_find( |
| 272 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked, "echo", | 274 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret_hooked, "echo", |
| 273 | strlen("echo"))) { | 275 | strlen("echo"))) && NULL == zend_write_default) { |
| 274 | zend_write_default = zend_write; | 276 | zend_write_default = zend_write; |
| 275 | zend_write = hook_echo; | 277 | zend_write = hook_echo; |
| 276 | } | 278 | } |
