summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-01-16 14:41:52 +0800
committerXinchen Hui <laruence@php.net>2014-01-16 14:41:52 +0800
commit9799816e0cb3552f179cdc6c44ab2a9c99cfca7e (patch)
treeb837ba93aa70894af75f0fc0137a104728c225cd
parentffcff225fd4c20144470c3b2c9868d78ecda87e6 (diff)
parentb777248ded69289b84d645ba2f36dbc207c77ff7 (diff)
downloadphp-git-9799816e0cb3552f179cdc6c44ab2a9c99cfca7e.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
-rw-r--r--ext/session/session.c12
-rw-r--r--ext/session/tests/bug66481.phpt5
2 files changed, 5 insertions, 12 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 571002ddcd..90d6ba7447 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -668,19 +668,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"
-