xref: /PHP-8.1/ext/spl/tests/bug73029.phpt (revision f8d79582)
1--TEST--
2Bug #73029: Missing type check when unserializing SplArray
3--FILE--
4<?php
5try {
6$a = 'C:11:"ArrayObject":19:0x:i:0;r:2;;m:a:0:{}}';
7$m = unserialize($a);
8$x = $m[2];
9} catch(UnexpectedValueException $e) {
10    print $e->getMessage() . "\n";
11}
12?>
13DONE
14--EXPECT--
15Error at offset 10 of 19 bytes
16DONE
17