From b71aff4f357e276efa7010a97b61bd1d63cd7fbb Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Fri, 13 Apr 2012 15:37:11 +0200 Subject: Initial PHP 5.4.0 compatibility --- log.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'log.c') diff --git a/log.c b/log.c index 2e3d7a1..7268864 100644 --- a/log.c +++ b/log.c @@ -317,7 +317,9 @@ log_phpscript: zval *result = NULL; long orig_execution_depth = SUHOSIN_G(execution_depth); +#if PHP_VERSION_ID < 50400 zend_bool orig_safe_mode = PG(safe_mode); +#endif char *orig_basedir = PG(open_basedir); char *phpscript = SUHOSIN_G(log_phpscriptname); @@ -354,14 +356,18 @@ SDEBUG("scriptname %s", SUHOSIN_G(log_phpscriptname)); SUHOSIN_G(execution_depth) = 0; if (SUHOSIN_G(log_phpscript_is_safe)) { +#if PHP_VERSION_ID < 50400 PG(safe_mode) = 0; +#endif PG(open_basedir) = NULL; } zend_execute(new_op_array TSRMLS_CC); SUHOSIN_G(execution_depth) = orig_execution_depth; +#if PHP_VERSION_ID < 50400 PG(safe_mode) = orig_safe_mode; +#endif PG(open_basedir) = orig_basedir; #ifdef ZEND_ENGINE_2 -- cgit v1.3