mirror of
https://github.com/php/php-src.git
synced 2024-09-26 20:37:29 +00:00
ea466a316f
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.
20 lines
336 B
PHP
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
|