]> granicus.if.org Git - php/commitdiff
forked the test for bug #66481
authorAnatol Belski <ab@php.net>
Fri, 17 Jan 2014 02:30:42 +0000 (03:30 +0100)
committerAnatol Belski <ab@php.net>
Fri, 17 Jan 2014 02:30:42 +0000 (03:30 +0100)
ext/session/tests/bug66481-win32.phpt [new file with mode: 0644]
ext/session/tests/bug66481.phpt

diff --git a/ext/session/tests/bug66481-win32.phpt b/ext/session/tests/bug66481-win32.phpt
new file mode 100644 (file)
index 0000000..cf06cb6
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Bug #66481: Calls to session_name() segfault when session.name is null, Windows.
+--INI--
+session.name=
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only"); ?>
+--FILE--
+<?php
+
+var_dump(session_name("foo"));
+var_dump(session_name("bar"));
+--EXPECTF--
+Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
+string(9) "PHPSESSID"
+string(3) "foo"
+PHP Warning:  PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
index cf6ad6a8d6673fe17bda43bd538c7747356840df..5525ae8a38dffcdd6dd7c1efc116b94ed132d9c7 100644 (file)
@@ -4,6 +4,7 @@ Bug #66481: Calls to session_name() segfault when session.name is null.
 session.name=
 --SKIPIF--
 <?php include('skipif.inc'); ?>
+<?php if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows"); ?>
 --FILE--
 <?php