mirror of
https://github.com/php/php-src.git
synced 2024-12-04 23:34:25 +08:00
28 lines
616 B
PHP
28 lines
616 B
PHP
--TEST--
|
|
Check that SplObjectStorage::unserialize returns NULL when non-string param is passed
|
|
--CREDITS--
|
|
PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
|
|
--FILE--
|
|
<?php
|
|
|
|
$data_provider = array(
|
|
array(),
|
|
new stdClass(),
|
|
);
|
|
|
|
foreach($data_provider as $input) {
|
|
|
|
$s = new SplObjectStorage();
|
|
|
|
var_dump($s->unserialize($input));
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: SplObjectStorage::unserialize() expects parameter 1 to be %binary_string_optional%, array given in %s on line %d
|
|
NULL
|
|
|
|
Warning: SplObjectStorage::unserialize() expects parameter 1 to be %binary_string_optional%, object given in %s on line %d
|
|
NULL
|
|
|