File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / bug24592.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:42 2012 UTC (12 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

--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
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>