Skip to content

Commit eab0f59

Browse files
author
Sascha Schumann
committed
code from ancient bug php#5271
setting $_SESSION before session_start() should not cause segfault
1 parent 3998374 commit eab0f59

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ext/session/tests/017.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
setting $_SESSION before session_start() should not cause segfault
3+
--SKIPIF--
4+
<?php include('skipif.inc'); ?>
5+
--INI--
6+
session.use_cookies=0
7+
session.cache_limiter=
8+
--FILE--
9+
<?php
10+
11+
error_reporting(E_ALL);
12+
13+
class Kill {
14+
function Kill() {
15+
global $HTTP_SESSION_VARS;
16+
session_start();
17+
}
18+
}
19+
$k = new Kill();
20+
21+
print "I live\n";
22+
?>
23+
--EXPECT--
24+
I live

0 commit comments

Comments
 (0)