1
0
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:
Xinchen Hui
2014-01-16 14:42:04 +08:00
2 changed files with 5 additions and 12 deletions

View File

@@ -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;

View File

@@ -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"