blob: 4c62356d96da7430408c89c792c03e75f9b024b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Unserialize ok, but called with the wrong number of arguments
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_serialize.ini
--FILE--
<?php
$a=serialize("a");
var_dump(unserialize($a, "too", "many", "aaaaaaaarguments!"));
?>
--EXPECTF--
Fatal error: Uncaught ArgumentCountError: unserialize() expects at most 2 arguments, 4 given in %s/tests/unserialize_php8/unserialize_wrong_call.php:3
Stack trace:
#0 %s/tests/unserialize_php8/unserialize_wrong_call.php(3): unserialize('s:1:"a";', 'too', 'many', 'aaaaaaaargument...')
#1 {main}
thrown in %s/tests/unserialize_php8/unserialize_wrong_call.php on line 3
|