diff options
| author | Xinchen Hui <laruence@php.net> | 2014-01-16 14:42:04 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2014-01-16 14:42:04 +0800 |
| commit | bfcdd678655403dcd3d82786da4c56eb205aa401 (patch) | |
| tree | 942fcc05ad569ab98d5d59cf0407868f0998620e /ext | |
| parent | 518327f7e3198acc4419a32c67c6622b3067d134 (diff) | |
| parent | 9799816e0cb3552f179cdc6c44ab2a9c99cfca7e (diff) | |
| download | php-git-bfcdd678655403dcd3d82786da4c56eb205aa401.tar.gz | |
Merge branch 'PHP-5.5' into PHP-5.6
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/session/session.c | 12 | ||||
| -rw-r--r-- | ext/session/tests/bug66481.phpt | 5 |
2 files changed, 5 insertions, 12 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 8619c3fe62..e16b79f585 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -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; diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt index 0479b5ff4d..cf6ad6a8d6 100644 --- a/ext/session/tests/bug66481.phpt +++ b/ext/session/tests/bug66481.phpt @@ -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" - |
