]> granicus.if.org Git - php/commit
Fix bug #79447
authorNicolas Grekas <nicolas.grekas@gmail.com>
Wed, 15 Apr 2020 22:11:38 +0000 (00:11 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 23 Apr 2020 08:30:33 +0000 (10:30 +0200)
commit73d02c3b3eb8b828a1cc7ae04a4cc4f4875c3ddd
treece843e9b79af1d8feb4c29ef17e3b1183e268c19
parentc705079b12984dab1901a32b4a0609f2ab8f449a
Fix bug #79447

Partially reverts 846b6479537a112d1ded725e6484e46462048b35: instead of
throwing, this skips uninitialized typed properties when serializing objects.

This makes serialize with __sleep() behave the same as serialize()
without __sleep().

As in the non-__sleep() case, unserialize(serialize($x)) identity
may not be preserved due to replacement of uninitialized/unset
properties with default values. Fixing this will require changes to
the serialization format.

Closes GH-5396.
NEWS
ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt
ext/standard/var.c