mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00

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.
19 lines
336 B
PHP
19 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
|