mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
Merge branch 'PHP-5.5' into PHP-5.6
This commit is contained in:
@@ -689,19 +689,11 @@ static PHP_INI_MH(OnUpdateSaveDir) /* {{{ */
|
||||
|
||||
static PHP_INI_MH(OnUpdateName) /* {{{ */
|
||||
{
|
||||
/* Don't accept a blank session name from php.ini or -d session.name= */
|
||||
if (!PG(modules_activated) && !new_value_length) {
|
||||
/* Force the default value. */
|
||||
new_value = "PHPSESSID";
|
||||
new_value_length = 9;
|
||||
}
|
||||
|
||||
/* Numeric session.name won't work at all */
|
||||
if (PG(modules_activated) &&
|
||||
(!new_value_length || is_numeric_string(new_value, new_value_length, NULL, NULL, 0))) {
|
||||
if ((!new_value_length || is_numeric_string(new_value, new_value_length, NULL, NULL, 0))) {
|
||||
int err_type;
|
||||
|
||||
if (stage == ZEND_INI_STAGE_RUNTIME) {
|
||||
if (stage == ZEND_INI_STAGE_RUNTIME || stage == ZEND_INI_STAGE_ACTIVATE || stage == ZEND_INI_STAGE_STARTUP) {
|
||||
err_type = E_WARNING;
|
||||
} else {
|
||||
err_type = E_ERROR;
|
||||
|
||||
@@ -9,8 +9,9 @@ session.name=
|
||||
|
||||
var_dump(session_name("foo"));
|
||||
var_dump(session_name("bar"));
|
||||
|
||||
--EXPECTF--
|
||||
PHP Warning: 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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user