]> granicus.if.org Git - php/commit
Fix Request #67453 Allow to unserialize empty data.
authorRemi Collet <remi@php.net>
Tue, 17 Jun 2014 07:38:54 +0000 (09:38 +0200)
committerRemi Collet <remi@php.net>
Tue, 17 Jun 2014 07:38:54 +0000 (09:38 +0200)
commitea466a316ffc39c7d5733c5aa1c37ab604af6e57
treeef556bde28d4621c9720736c0be802494b6e59ad
parentb538816b0bff9f974223be1b39e4cbdd9cda8adc
Fix Request #67453 Allow to unserialize empty data.

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.
ext/spl/spl_array.c
ext/spl/spl_dllist.c
ext/spl/spl_observer.c
ext/spl/tests/ArrayObject_unserialize_empty_string.phpt
ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt