summaryrefslogtreecommitdiff
path: root/ext/session/tests/bug24592.phpt
blob: f70974d11971f7692b143cf48cd49ce1a94ef139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--TEST--
Bug #24592 (crash when multiple NULL values are being stored)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
html_errors=0
session.save_handler=files
--FILE--
<?php
@session_start();
        
$foo = $_SESSION['foo'];
$bar = $_SESSION['bar'];
                        
var_dump($foo, $bar, $_SESSION);

$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar;
                                        
var_dump($_SESSION);
?>
--EXPECTF--
Notice: Undefined index:  foo in %s on line %d

Notice: Undefined index:  bar in %s on line %d
NULL
NULL
array(0) {
}
array(2) {
  ["foo"]=>
  NULL
  ["bar"]=>
  NULL
}
--UEXPECTF--
Notice: Undefined index:  foo in %s on line %d

Notice: Undefined index:  bar in %s on line %d
NULL
NULL
array(0) {
}
array(2) {
  [u"foo"]=>
  NULL
  [u"bar"]=>
  NULL
}