summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorStefan Esser2012-04-13 15:37:11 +0200
committerStefan Esser2012-04-13 15:37:11 +0200
commitb71aff4f357e276efa7010a97b61bd1d63cd7fbb (patch)
tree33087e1f0a3543f83ec006a30ef8f0304f4a77d9 /log.c
parent6b00f2346c2529a9169cf1c04580e293a77f6a71 (diff)
Initial PHP 5.4.0 compatibility
Diffstat (limited to 'log.c')
-rw-r--r--log.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/log.c b/log.c
index 2e3d7a1..7268864 100644
--- a/log.c
+++ b/log.c
@@ -317,7 +317,9 @@ log_phpscript:
317 zval *result = NULL; 317 zval *result = NULL;
318 318
319 long orig_execution_depth = SUHOSIN_G(execution_depth); 319 long orig_execution_depth = SUHOSIN_G(execution_depth);
320#if PHP_VERSION_ID < 50400
320 zend_bool orig_safe_mode = PG(safe_mode); 321 zend_bool orig_safe_mode = PG(safe_mode);
322#endif
321 char *orig_basedir = PG(open_basedir); 323 char *orig_basedir = PG(open_basedir);
322 324
323 char *phpscript = SUHOSIN_G(log_phpscriptname); 325 char *phpscript = SUHOSIN_G(log_phpscriptname);
@@ -354,14 +356,18 @@ SDEBUG("scriptname %s", SUHOSIN_G(log_phpscriptname));
354 356
355 SUHOSIN_G(execution_depth) = 0; 357 SUHOSIN_G(execution_depth) = 0;
356 if (SUHOSIN_G(log_phpscript_is_safe)) { 358 if (SUHOSIN_G(log_phpscript_is_safe)) {
359#if PHP_VERSION_ID < 50400
357 PG(safe_mode) = 0; 360 PG(safe_mode) = 0;
361#endif
358 PG(open_basedir) = NULL; 362 PG(open_basedir) = NULL;
359 } 363 }
360 364
361 zend_execute(new_op_array TSRMLS_CC); 365 zend_execute(new_op_array TSRMLS_CC);
362 366
363 SUHOSIN_G(execution_depth) = orig_execution_depth; 367 SUHOSIN_G(execution_depth) = orig_execution_depth;
368#if PHP_VERSION_ID < 50400
364 PG(safe_mode) = orig_safe_mode; 369 PG(safe_mode) = orig_safe_mode;
370#endif
365 PG(open_basedir) = orig_basedir; 371 PG(open_basedir) = orig_basedir;
366 372
367#ifdef ZEND_ENGINE_2 373#ifdef ZEND_ENGINE_2