1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/standard/tests/serialize/bug72663_3.phpt
Nikita Popov e0f9fbdfa6 Bug #72663 - part 3
When using the php_serialize session serialization handler, do
not use the result of the unserialization if it failed.
2016-08-17 01:01:03 -07:00

18 lines
483 B
PHP

--TEST--
Bug #72663 (3): If unserialization fails, don't initialize the session with the result
--SKIPIF--
<?php if (!extension_loaded('session')) die('skip Session extension required'); ?>
--INI--
session.serialize_handler=php_serialize
--FILE--
<?php
session_start();
$sess = 'O:9:"Exception":2:{s:7:"'."\0".'*'."\0".'file";R:1;}';
session_decode($sess);
var_dump($_SESSION);
?>
--EXPECTF--
Notice: session_decode(): Unexpected end of serialized data in %s on line %d
array(0) {
}