com php-src: Reverted ad4533fdbabcc3e545277e30023b2fdce16297a0: ext/session/mod_user.c ext/session/mod_user_class.c ext/session/session.c
ext/session/tests/bug6086 0.phpt ext/session/tests/bug66481.phpt ext/ session/tests/bug67972.phpt ext/session/tests/ses
sion_module_name_variation3.phpt ext/session/tests/ session_name_error.phpt ext/session/tests/session_nam e_variation1.phpt
ext/session/tests/session_save_pa th_variation4.phpt ext/session/tests/ses
| From: | Anatol Belski | Date: | Tue, 21 Jul 2015 09:18:36 +0000 |
| Subject: | com php-src: Reverted ad4533fdbabcc3e545277e30023b2fdce16297a0: ext/session/mod_user.c ext/session/mod_user_class.c ext/session/session.c ext/session/tests/bug6086 0.phpt ext/session/tests/bug66481.phpt ext/ session/tests/bug67972.phpt ext/session/tests/ses sion_module_name_variation3.phpt ext/session/tests/ session_name_error.phpt ext/session/tests/session_nam e_variation1.phpt ext/session/tests/session_save_pa th_variation4.phpt ext/session/tests/ses |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88089@lists.php.net to get a copy of this message | ||
Commit: 6065b29fe41f09e01dd06ba21980e0344f13230c
Author: Anatol Belski <ab@php.net> Tue, 21 Jul 2015 11:18:36 +0200
Parents: 1767992e4e5f9d7c82571009b8b7f21f5f6ccd64
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6065b29fe41f09e01dd06ba21980e0344f13230c
Log:
Reverted ad4533fdbabcc3e545277e30023b2fdce16297a0
The E_ERROR to E_RECOVERABLE_ERROR should be readded with the
proper tests.
Changed paths:
M ext/session/mod_user.c
M ext/session/mod_user_class.c
M ext/session/session.c
M ext/session/tests/bug60860.phpt
M ext/session/tests/bug66481.phpt
M ext/session/tests/bug67972.phpt
M ext/session/tests/session_module_name_variation3.phpt
M ext/session/tests/session_name_error.phpt
M ext/session/tests/session_name_variation1.phpt
M ext/session/tests/session_save_path_variation4.phpt
M ext/session/tests/session_set_save_handler_class_014.phpt
M ext/session/tests/session_set_save_handler_error3.phpt
M ext/session/tests/session_set_save_handler_sid_002.phpt
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 34a5a21..1196d86 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -191,12 +191,12 @@ PS_CREATE_SID_FUNC(user) } zval_ptr_dtor(&retval); } else { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "No session id returned by function"); + php_error_docref(NULL, E_ERROR, "No session id returned by function"); return NULL; } if (!id) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Session id must be a string"); + php_error_docref(NULL, E_ERROR, "Session id must be a string"); return NULL; } diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c index d06902c..82aea14 100644 --- a/ext/session/mod_user_class.c +++ b/ext/session/mod_user_class.c @@ -23,7 +23,7 @@ #define PS_SANITY_CHECK \ if (PS(default_mod) == NULL) { \ - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Cannot call default session handler"); \ + php_error_docref(NULL, E_CORE_ERROR, "Cannot call default session handler"); \ RETURN_FALSE; \ } diff --git a/ext/session/session.c b/ext/session/session.c index cf4af11..ef17b86 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -339,7 +339,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ case PS_HASH_FUNC_OTHER: if (!PS(hash_ops)) { efree(buf); - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Invalid session hash function"); + php_error_docref(NULL, E_ERROR, "Invalid session hash function"); return NULL; } @@ -351,7 +351,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ #endif /* HAVE_HASH_EXT */ default: efree(buf); - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Invalid session hash function"); + php_error_docref(NULL, E_ERROR, "Invalid session hash function"); return NULL; } efree(buf); @@ -480,7 +480,7 @@ static void php_session_initialize(void) /* {{{ */ zend_string *val = NULL; if (!PS(mod)) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "No storage module chosen - failed to initialize session"); + php_error_docref(NULL, E_ERROR, "No storage module chosen - failed to initialize session"); return; } @@ -488,7 +488,7 @@ static void php_session_initialize(void) /* {{{ */ if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE /* || PS(mod_data) == NULL */ /* FIXME: open must set valid PS(mod_data) with success */ ) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); return; } @@ -496,7 +496,7 @@ static void php_session_initialize(void) /* {{{ */ if (!PS(id)) { PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); if (!PS(id)) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_ERROR, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); return; } if (PS(use_cookies)) { @@ -600,7 +600,7 @@ static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -630,7 +630,7 @@ static PHP_INI_MH(OnUpdateSerializer) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -699,7 +699,7 @@ static PHP_INI_MH(OnUpdateName) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME || stage == ZEND_INI_STAGE_ACTIVATE || stage == ZEND_INI_STAGE_STARTUP) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -1829,7 +1829,7 @@ static PHP_FUNCTION(session_set_save_handler) add_next_index_zval(&PS(mod_user_names).names[i], obj); add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); } else { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Session handler's function table is corrupt"); + php_error_docref(NULL, E_ERROR, "Session handler's function table is corrupt"); RETURN_FALSE; } diff --git a/ext/session/tests/bug60860.phpt b/ext/session/tests/bug60860.phpt index 194239d..8318586 100644 --- a/ext/session/tests/bug60860.phpt +++ b/ext/session/tests/bug60860.phpt @@ -14,4 +14,4 @@ echo "ok\n"; --EXPECTF-- Warning: session_start(): user session functions not defined in %s on line 3 -Catchable fatal error: session_start(): Failed to initialize storage module: user (path:%s) in %s on line 3 +Fatal error: session_start(): Failed to initialize storage module: user (path:%s) in %s on line 3 diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt index 27171da..5525ae8 100644 --- a/ext/session/tests/bug66481.phpt +++ b/ext/session/tests/bug66481.phpt @@ -11,8 +11,8 @@ session.name= var_dump(session_name("foo")); var_dump(session_name("bar")); --EXPECTF-- -PHP Catchable fatal error: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 +PHP Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 -Catchable fatal error: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 +Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 string(9) "PHPSESSID" string(3) "foo" diff --git a/ext/session/tests/bug67972.phpt b/ext/session/tests/bug67972.phpt index c4bcc1a..63ed3a9 100644 --- a/ext/session/tests/bug67972.phpt +++ b/ext/session/tests/bug67972.phpt @@ -7,4 +7,4 @@ Bug #67972: SessionHandler Invalid memory read create_sid() (new SessionHandler)->create_sid(); --EXPECTF-- -Catchable fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d +Fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d diff --git a/ext/session/tests/session_module_name_variation3.phpt b/ext/session/tests/session_module_name_variation3.phpt index aabb8ba..de49195 100644 --- a/ext/session/tests/session_module_name_variation3.phpt +++ b/ext/session/tests/session_module_name_variation3.phpt @@ -48,4 +48,4 @@ Stack trace: #2 {main} thrown in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: %s in %s%esession_module_name_variation3.php on line %d +Fatal error: session_start(): Failed to initialize storage module: %s in %s%esession_module_name_variation3.php on line %d diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt index cd7e364..9f0101d 100644 --- a/ext/session/tests/session_name_error.phpt +++ b/ext/session/tests/session_name_error.phpt @@ -8,21 +8,6 @@ session.name=PHPSESSID --FILE-- <?php -function error_handler($errno, $errstr, $errfile, $errline) -{ - if ($errno & E_NOTICE) { - return ture; // Ignore notices - } - if ($errno & E_RECOVERABLE_ERROR) { - // Handle E_REVOCERABLE_ERROR - echo "\nE_RECOVERABLE_ERROR: {$errstr} in {$errfile} on line {$errline}\n"; - return true; // Continue execution - } - return false; -} - -set_error_handler('error_handler'); - ob_start(); /* @@ -114,103 +99,103 @@ ob_end_flush(); -- Iteration 1 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d int(0) string(9) "PHPSESSID" -- Iteration 2 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d int(1) string(9) "PHPSESSID" -- Iteration 3 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d int(12345) string(9) "PHPSESSID" -- Iteration 4 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d int(-2345) string(9) "PHPSESSID" -- Iteration 5 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d float(10.5) string(9) "PHPSESSID" -- Iteration 6 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d float(-10.5) string(9) "PHPSESSID" -- Iteration 7 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d float(123456789000) string(9) "PHPSESSID" -- Iteration 8 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d float(1.23456789E-9) string(9) "PHPSESSID" -- Iteration 9 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d float(0.5) string(9) "PHPSESSID" -- Iteration 10 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(9) "PHPSESSID" -- Iteration 11 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(9) "PHPSESSID" -- Iteration 12 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d bool(true) string(9) "PHPSESSID" -- Iteration 13 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d bool(false) string(9) "PHPSESSID" -- Iteration 14 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d bool(true) string(9) "PHPSESSID" -- Iteration 15 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d bool(false) string(9) "PHPSESSID" -- Iteration 16 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(0) "" string(9) "PHPSESSID" -- Iteration 17 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(0) "" string(9) "PHPSESSID" @@ -233,13 +218,13 @@ string(12) "Hello World!" -- Iteration 22 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(12) "Hello World!" -- Iteration 23 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(12) "Hello World!" diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt index c00ffbf..b0de3ee 100644 --- a/ext/session/tests/session_name_variation1.phpt +++ b/ext/session/tests/session_name_variation1.phpt @@ -7,20 +7,6 @@ session.name=PHPSESSID <?php include('skipif.inc'); ?> --FILE-- <?php -function error_handler($errno, $errstr, $errfile, $errline) -{ - if ($errno & E_NOTICE) { - return ture; // Ignore notices - } - if ($errno & E_RECOVERABLE_ERROR) { - // Handle E_REVOCERABLE_ERROR - echo "\nE_RECOVERABLE_ERROR: {$errstr} in {$errfile} on line {$errline}\n"; - return true; // Continue execution - } - return false; -} - -set_error_handler('error_handler'); ob_start(); @@ -66,7 +52,7 @@ string(1) " " bool(true) string(1) " " -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(1) " " bool(true) string(1) " " diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index 0783938..80db6ca 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -56,5 +56,5 @@ string(0) "" Warning: session_start(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d +Fatal error: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_class_014.phpt b/ext/session/tests/session_set_save_handler_class_014.phpt index 6645907..ea62beb 100644 --- a/ext/session/tests/session_set_save_handler_class_014.phpt +++ b/ext/session/tests/session_set_save_handler_class_014.phpt @@ -27,4 +27,4 @@ session_start(); --EXPECTF-- *** Testing session_set_save_handler() : calling default handler when save_handler=user *** -Catchable fatal error: SessionHandler::open(): Cannot call default session handler in %s on line %d +Fatal error: SessionHandler::open(): Cannot call default session handler in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_error3.phpt b/ext/session/tests/session_set_save_handler_error3.phpt index 345ebe9..fdf306a 100644 --- a/ext/session/tests/session_set_save_handler_error3.phpt +++ b/ext/session/tests/session_set_save_handler_error3.phpt @@ -41,4 +41,4 @@ Stack trace: #2 {main} thrown in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: %s in %ssession_set_save_handler_error3.php on line %d +Fatal error: session_start(): Failed to initialize storage module: %s in %ssession_set_save_handler_error3.php on line %d diff --git a/ext/session/tests/session_set_save_handler_sid_002.phpt b/ext/session/tests/session_set_save_handler_sid_002.phpt index f9edb82..f9a72ae 100644 --- a/ext/session/tests/session_set_save_handler_sid_002.phpt +++ b/ext/session/tests/session_set_save_handler_sid_002.phpt @@ -74,4 +74,4 @@ session_unset(); --EXPECTF-- *** Testing session_set_save_handler() function: create_sid *** -Catchable fatal error: session_start(): Session id must be a string in %s on line %d +Fatal error: session_start(): Session id must be a string in %s on line %d
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 34a5a21..1196d86 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -191,12 +191,12 @@ PS_CREATE_SID_FUNC(user) } zval_ptr_dtor(&retval); } else { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "No session id returned by function"); + php_error_docref(NULL, E_ERROR, "No session id returned by function"); return NULL; } if (!id) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Session id must be a string"); + php_error_docref(NULL, E_ERROR, "Session id must be a string"); return NULL; } diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c index d06902c..82aea14 100644 --- a/ext/session/mod_user_class.c +++ b/ext/session/mod_user_class.c @@ -23,7 +23,7 @@ #define PS_SANITY_CHECK \ if (PS(default_mod) == NULL) { \ - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Cannot call default session handler"); \ + php_error_docref(NULL, E_CORE_ERROR, "Cannot call default session handler"); \ RETURN_FALSE; \ } diff --git a/ext/session/session.c b/ext/session/session.c index cf4af11..ef17b86 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -339,7 +339,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ case PS_HASH_FUNC_OTHER: if (!PS(hash_ops)) { efree(buf); - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Invalid session hash function"); + php_error_docref(NULL, E_ERROR, "Invalid session hash function"); return NULL; } @@ -351,7 +351,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ #endif /* HAVE_HASH_EXT */ default: efree(buf); - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Invalid session hash function"); + php_error_docref(NULL, E_ERROR, "Invalid session hash function"); return NULL; } efree(buf); @@ -480,7 +480,7 @@ static void php_session_initialize(void) /* {{{ */ zend_string *val = NULL; if (!PS(mod)) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "No storage module chosen - failed to initialize session"); + php_error_docref(NULL, E_ERROR, "No storage module chosen - failed to initialize session"); return; } @@ -488,7 +488,7 @@ static void php_session_initialize(void) /* {{{ */ if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE /* || PS(mod_data) == NULL */ /* FIXME: open must set valid PS(mod_data) with success */ ) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path)); return; } @@ -496,7 +496,7 @@ static void php_session_initialize(void) /* {{{ */ if (!PS(id)) { PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); if (!PS(id)) { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_ERROR, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); return; } if (PS(use_cookies)) { @@ -600,7 +600,7 @@ static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -630,7 +630,7 @@ static PHP_INI_MH(OnUpdateSerializer) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -699,7 +699,7 @@ static PHP_INI_MH(OnUpdateName) /* {{{ */ int err_type; if (stage == ZEND_INI_STAGE_RUNTIME || stage == ZEND_INI_STAGE_ACTIVATE || stage == ZEND_INI_STAGE_STARTUP) { - err_type = E_RECOVERABLE_ERROR; + err_type = E_WARNING; } else { err_type = E_ERROR; } @@ -1829,7 +1829,7 @@ static PHP_FUNCTION(session_set_save_handler) add_next_index_zval(&PS(mod_user_names).names[i], obj); add_next_index_str(&PS(mod_user_names).names[i], zend_string_copy(func_name)); } else { - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Session handler's function table is corrupt"); + php_error_docref(NULL, E_ERROR, "Session handler's function table is corrupt"); RETURN_FALSE; } diff --git a/ext/session/tests/bug60860.phpt b/ext/session/tests/bug60860.phpt index 194239d..8318586 100644 --- a/ext/session/tests/bug60860.phpt +++ b/ext/session/tests/bug60860.phpt @@ -14,4 +14,4 @@ echo "ok\n"; --EXPECTF-- Warning: session_start(): user session functions not defined in %s on line 3 -Catchable fatal error: session_start(): Failed to initialize storage module: user (path:%s) in %s on line 3 +Fatal error: session_start(): Failed to initialize storage module: user (path:%s) in %s on line 3 diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt index 27171da..5525ae8 100644 --- a/ext/session/tests/bug66481.phpt +++ b/ext/session/tests/bug66481.phpt @@ -11,8 +11,8 @@ session.name= var_dump(session_name("foo")); var_dump(session_name("bar")); --EXPECTF-- -PHP Catchable fatal error: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 +PHP Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 -Catchable fatal error: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 +Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0 string(9) "PHPSESSID" string(3) "foo" diff --git a/ext/session/tests/bug67972.phpt b/ext/session/tests/bug67972.phpt index c4bcc1a..63ed3a9 100644 --- a/ext/session/tests/bug67972.phpt +++ b/ext/session/tests/bug67972.phpt @@ -7,4 +7,4 @@ Bug #67972: SessionHandler Invalid memory read create_sid() (new SessionHandler)->create_sid(); --EXPECTF-- -Catchable fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d +Fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d diff --git a/ext/session/tests/session_module_name_variation3.phpt b/ext/session/tests/session_module_name_variation3.phpt index aabb8ba..de49195 100644 --- a/ext/session/tests/session_module_name_variation3.phpt +++ b/ext/session/tests/session_module_name_variation3.phpt @@ -48,4 +48,4 @@ Stack trace: #2 {main} thrown in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: %s in %s%esession_module_name_variation3.php on line %d +Fatal error: session_start(): Failed to initialize storage module: %s in %s%esession_module_name_variation3.php on line %d diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt index cd7e364..9f0101d 100644 --- a/ext/session/tests/session_name_error.phpt +++ b/ext/session/tests/session_name_error.phpt @@ -8,21 +8,6 @@ session.name=PHPSESSID --FILE-- <?php -function error_handler($errno, $errstr, $errfile, $errline) -{ - if ($errno & E_NOTICE) { - return ture; // Ignore notices - } - if ($errno & E_RECOVERABLE_ERROR) { - // Handle E_REVOCERABLE_ERROR - echo "\nE_RECOVERABLE_ERROR: {$errstr} in {$errfile} on line {$errline}\n"; - return true; // Continue execution - } - return false; -} - -set_error_handler('error_handler'); - ob_start(); /* @@ -114,103 +99,103 @@ ob_end_flush(); -- Iteration 1 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d int(0) string(9) "PHPSESSID" -- Iteration 2 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d int(1) string(9) "PHPSESSID" -- Iteration 3 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d int(12345) string(9) "PHPSESSID" -- Iteration 4 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d int(-2345) string(9) "PHPSESSID" -- Iteration 5 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d float(10.5) string(9) "PHPSESSID" -- Iteration 6 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d float(-10.5) string(9) "PHPSESSID" -- Iteration 7 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d float(123456789000) string(9) "PHPSESSID" -- Iteration 8 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d float(1.23456789E-9) string(9) "PHPSESSID" -- Iteration 9 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d float(0.5) string(9) "PHPSESSID" -- Iteration 10 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(9) "PHPSESSID" -- Iteration 11 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(9) "PHPSESSID" -- Iteration 12 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d bool(true) string(9) "PHPSESSID" -- Iteration 13 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d bool(false) string(9) "PHPSESSID" -- Iteration 14 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d bool(true) string(9) "PHPSESSID" -- Iteration 15 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d bool(false) string(9) "PHPSESSID" -- Iteration 16 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(0) "" string(9) "PHPSESSID" -- Iteration 17 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(0) "" string(9) "PHPSESSID" @@ -233,13 +218,13 @@ string(12) "Hello World!" -- Iteration 22 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(12) "Hello World!" -- Iteration 23 -- -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d NULL string(12) "Hello World!" diff --git a/ext/session/tests/session_name_variation1.phpt b/ext/session/tests/session_name_variation1.phpt index c00ffbf..b0de3ee 100644 --- a/ext/session/tests/session_name_variation1.phpt +++ b/ext/session/tests/session_name_variation1.phpt @@ -7,20 +7,6 @@ session.name=PHPSESSID <?php include('skipif.inc'); ?> --FILE-- <?php -function error_handler($errno, $errstr, $errfile, $errline) -{ - if ($errno & E_NOTICE) { - return ture; // Ignore notices - } - if ($errno & E_RECOVERABLE_ERROR) { - // Handle E_REVOCERABLE_ERROR - echo "\nE_RECOVERABLE_ERROR: {$errstr} in {$errfile} on line {$errline}\n"; - return true; // Continue execution - } - return false; -} - -set_error_handler('error_handler'); ob_start(); @@ -66,7 +52,7 @@ string(1) " " bool(true) string(1) " " -E_RECOVERABLE_ERROR: session_name(): session.name cannot be a numeric or empty '' in %s on line %d +Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d string(1) " " bool(true) string(1) " " diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index 0783938..80db6ca 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -56,5 +56,5 @@ string(0) "" Warning: session_start(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d +Fatal error: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_class_014.phpt b/ext/session/tests/session_set_save_handler_class_014.phpt index 6645907..ea62beb 100644 --- a/ext/session/tests/session_set_save_handler_class_014.phpt +++ b/ext/session/tests/session_set_save_handler_class_014.phpt @@ -27,4 +27,4 @@ session_start(); --EXPECTF-- *** Testing session_set_save_handler() : calling default handler when save_handler=user *** -Catchable fatal error: SessionHandler::open(): Cannot call default session handler in %s on line %d +Fatal error: SessionHandler::open(): Cannot call default session handler in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_error3.phpt b/ext/session/tests/session_set_save_handler_error3.phpt index 345ebe9..fdf306a 100644 --- a/ext/session/tests/session_set_save_handler_error3.phpt +++ b/ext/session/tests/session_set_save_handler_error3.phpt @@ -41,4 +41,4 @@ Stack trace: #2 {main} thrown in %s on line %d -Catchable fatal error: session_start(): Failed to initialize storage module: %s in %ssession_set_save_handler_error3.php on line %d +Fatal error: session_start(): Failed to initialize storage module: %s in %ssession_set_save_handler_error3.php on line %d diff --git a/ext/session/tests/session_set_save_handler_sid_002.phpt b/ext/session/tests/session_set_save_handler_sid_002.phpt index f9edb82..f9a72ae 100644 --- a/ext/session/tests/session_set_save_handler_sid_002.phpt +++ b/ext/session/tests/session_set_save_handler_sid_002.phpt @@ -74,4 +74,4 @@ session_unset(); --EXPECTF-- *** Testing session_set_save_handler() function: create_sid *** -Catchable fatal error: session_start(): Session id must be a string in %s on line %d +Fatal error: session_start(): Session id must be a string in %s on line %d