]> granicus.if.org Git - php/commitdiff
Revert "Bug #66481 Segfaults on session_name()"
authorXinchen Hui <laruence@php.net>
Thu, 16 Jan 2014 06:38:35 +0000 (14:38 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 16 Jan 2014 06:38:35 +0000 (14:38 +0800)
This reverts commit 5662ffb295c6f9cb10768d8246f2656aae6b8abb.

ext/session/session.c
ext/session/tests/bug66481.phpt [deleted file]

index 5ea38475db3243dc8a4e6f3bbd1af9057dae9c39..35db50ae647c48d333aaf2342ed28244e7de04ce 100644 (file)
@@ -617,13 +617,6 @@ 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))) {
diff --git a/ext/session/tests/bug66481.phpt b/ext/session/tests/bug66481.phpt
deleted file mode 100644 (file)
index 0479b5f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Bug #66481: Calls to session_name() segfault when session.name is null.
---INI--
-session.name=
---SKIPIF--
-<?php include('skipif.inc'); ?>
---FILE--
-<?php
-
-var_dump(session_name("foo"));
-var_dump(session_name("bar"));
-
---EXPECTF--
-string(9) "PHPSESSID"
-string(3) "foo"
-