php-src/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt
Remi Collet ea466a316f Fix Request #67453 Allow to unserialize empty data.
SplDoublyLinkedList, SplObjectStorage and ArrayObject have empty
constructor (no arg), so it make sense to allow to unserialize empty
data.

This allow the hack (used in various place, including PHPUnit) to
instanciate class without call to constructor to work.
2014-06-17 09:38:54 +02:00

20 lines
336 B
PHP

--TEST--
Check that SplObjectStorage::unserialize doesn't throws exception when NULL passed
--CREDITS--
PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
--FILE--
<?php
$s = new SplObjectStorage();
try {
$s->unserialize(NULL);
} catch(UnexpectedValueException $e) {
echo $e->getMessage();
}
?>
Done
--EXPECTF--
Done