mirror of
https://github.com/php/php-src.git
synced 2026-03-28 18:22:42 +01:00
workaround to make ext/session well behaved with 'make test' and E_ALL
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user