xref: /PHP-5.3/ext/session/tests/bug24592.phpt (revision 77af81b8)
1--TEST--
2Bug #24592 (crash when multiple NULL values are being stored)
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6register_globals=0
7html_errors=0
8session.save_handler=files
9--FILE--
10<?php
11@session_start();
12
13$foo = $_SESSION['foo'];
14$bar = $_SESSION['bar'];
15
16var_dump($foo, $bar, $_SESSION);
17
18$_SESSION['foo'] = $foo;
19$_SESSION['bar'] = $bar;
20
21var_dump($_SESSION);
22?>
23--EXPECTF--
24Notice: Undefined index: foo in %s on line %d
25
26Notice: Undefined index: bar in %s on line %d
27NULL
28NULL
29array(0) {
30}
31array(2) {
32  ["foo"]=>
33  NULL
34  ["bar"]=>
35  NULL
36}
37