Skip to content

Commit a218a8b

Browse files
committed
forked the test for bug #66481
1 parent b777248 commit a218a8b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

ext/session/tests/bug66481-win32.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Bug #66481: Calls to session_name() segfault when session.name is null, Windows.
3+
--INI--
4+
session.name=
5+
--SKIPIF--
6+
<?php include('skipif.inc'); ?>
7+
<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only"); ?>
8+
--FILE--
9+
<?php
10+
11+
var_dump(session_name("foo"));
12+
var_dump(session_name("bar"));
13+
--EXPECTF--
14+
Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
15+
string(9) "PHPSESSID"
16+
string(3) "foo"
17+
PHP Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0

ext/session/tests/bug66481.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Bug #66481: Calls to session_name() segfault when session.name is null.
44
session.name=
55
--SKIPIF--
66
<?php include('skipif.inc'); ?>
7+
<?php if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows"); ?>
78
--FILE--
89
<?php
910

0 commit comments

Comments
 (0)