From 7a955aa1c1566d3c5b33178bab4ea171a2d50101 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 26 Feb 2000 23:50:11 +0000 Subject: [PATCH] @- Fixed a (fairly common) situation where error_reporting values would not be @ properly restored after a call to error_reporting(), in between requests (Zeev) --- main/main.c | 7 +++++-- main/php_globals.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main/main.c b/main/main.c index be0084e7f4..3978987b9f 100644 --- a/main/main.c +++ b/main/main.c @@ -133,13 +133,15 @@ static PHP_INI_MH(OnChangeMemoryLimit) static PHP_INI_MH(OnUpdateErrorReporting) { + PLS_FETCH(); ELS_FETCH(); if (!new_value) { - EG(error_reporting) = E_ALL & ~E_NOTICE; + PG(error_reporting) = E_ALL & ~E_NOTICE; } else { - EG(error_reporting) = atoi(new_value); + PG(error_reporting) = atoi(new_value); } + EG(error_reporting) = PG(error_reporting); return SUCCESS; } @@ -656,6 +658,7 @@ void php_request_shutdown(void *dummy) php_call_shutdown_functions(); php_ini_rshutdown(); + EG(error_reporting) = PG(error_reporting); zend_deactivate(CLS_C ELS_CC); sapi_deactivate(SLS_C); diff --git a/main/php_globals.h b/main/php_globals.h index 1c50a7c1be..67e1946dd9 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -72,6 +72,7 @@ struct _php_core_globals { long memory_limit; + int error_reporting; zend_bool track_errors; zend_bool display_errors; zend_bool log_errors; -- 2.40.0