diff options
| author | Hartmut Holzgraefe <hholzgra@php.net> | 2001-07-11 13:46:11 +0000 |
|---|---|---|
| committer | Hartmut Holzgraefe <hholzgra@php.net> | 2001-07-11 13:46:11 +0000 |
| commit | 319149fd8bf52af56716c97f0a476a8bfc2040c3 (patch) | |
| tree | 8297150f4f22f3720ec69fe697f3e11e95af635f /ext/session/session.c | |
| parent | e15d0193d97897ef3e24615c902fd8d678fccc35 (diff) | |
| download | php-git-319149fd8bf52af56716c97f0a476a8bfc2040c3.tar.gz | |
workaround to make ext/session well behaved with 'make test' and E_ALL
Diffstat (limited to 'ext/session/session.c')
| -rw-r--r-- | ext/session/session.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 3b3cd7a42b..14cf24731e 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -801,6 +801,7 @@ static void php_session_start(PSLS_D) int module_number = PS(module_number); int nrand; int lensess; + int stored_error_reporting; ELS_FETCH(); if (PS(session_status) != php_session_none) @@ -889,7 +890,11 @@ static void php_session_start(PSLS_D) if (send_cookie) php_session_send_cookie(PSLS_C); - + + /* workaround to prevent warnings when redefining SID */ + stored_error_reporting=EG(error_reporting); + EG(error_reporting) ^= E_NOTICE; + if (define_sid) { smart_str var = {0}; @@ -902,6 +907,9 @@ static void php_session_start(PSLS_D) REGISTER_STRING_CONSTANT("SID", empty_string, 0); PS(define_sid) = define_sid; + /* workaround to prevent warnings when redefining SID */ + EG(error_reporting)=stored_error_reporting; + PS(session_status)= php_session_active; php_session_cache_limiter(PSLS_C); |
