--- /dev/null
+--TEST--
+Failure while parsing data array for __unserialize()
+--FILE--
+<?php
+
+class Test {
+ public function __unserialize(array $data) { }
+}
+
+var_dump(unserialize('O:4:"Test":1:{}'));
+
+?>
+--EXPECTF--
+Notice: unserialize(): Unexpected end of serialized data in %s on line %d
+
+Notice: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
+bool(false)
if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL(ary), elements, NULL)) {
ZVAL_DEREF(rval);
GC_ADD_FLAGS(Z_OBJ_P(rval), IS_OBJ_DESTRUCTOR_CALLED);
+ zval_ptr_dtor(&ary);
return 0;
}