From 784331fc2217f9084a57be7cb0e153532453fefd Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Thu, 22 Jan 2015 15:21:51 +0100 Subject: removed even more #ifdef ZEND_ENGINE_2 --- sha256.c | 4 ---- suhosin.c | 4 ---- treat_data.c | 11 +---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/sha256.c b/sha256.c index 64ee25f..8810f34 100644 --- a/sha256.c +++ b/sha256.c @@ -404,11 +404,7 @@ void suhosin_hook_sha256(TSRMLS_D) } /* add the sha256 functions */ -#ifndef ZEND_ENGINE_2 - zend_register_functions(suhosin_sha256_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); -#else zend_register_functions(NULL, suhosin_sha256_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); -#endif } diff --git a/suhosin.c b/suhosin.c index 76cdac1..1dedbd2 100644 --- a/suhosin.c +++ b/suhosin.c @@ -994,11 +994,7 @@ PHP_MINIT_FUNCTION(suhosin) SDEBUG("updating ini %s=%s", i->name, i->value); -#ifdef ZEND_ENGINE_2 i->modifiable = p->modifiable; -#else - i->modifyable = p->modifyable; -#endif i->module_number = module_number; i->on_modify = p->on_modify; i->mh_arg1 = p->mh_arg1; diff --git a/treat_data.c b/treat_data.c index 10e8166..aa645be 100644 --- a/treat_data.c +++ b/treat_data.c @@ -160,13 +160,9 @@ SAPI_TREAT_DATA_FUNC(suhosin_treat_data) val_len = php_url_decode(val, strlen(val)); val = estrndup(val, val_len); if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) { -#ifdef ZEND_ENGINE_2 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) { -#endif php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); -#ifdef ZEND_ENGINE_2 } -#endif } else { SUHOSIN_G(abort_request) = 1; } @@ -179,13 +175,9 @@ SAPI_TREAT_DATA_FUNC(suhosin_treat_data) val_len = 0; val = estrndup("", val_len); if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) { -#ifdef ZEND_ENGINE_2 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) { -#endif php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); -#ifdef ZEND_ENGINE_2 } -#endif } else { SUHOSIN_G(abort_request) = 1; } @@ -209,12 +201,11 @@ void suhosin_hook_treat_data() TSRMLS_FETCH(); sapi_register_treat_data(suhosin_treat_data TSRMLS_CC); -#ifdef ZEND_ENGINE_2 + if (old_input_filter == NULL) { old_input_filter = sapi_module.input_filter; } sapi_module.input_filter = suhosin_input_filter_wrapper; -#endif } -- cgit v1.3