History log of /PHP-7.4/ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# 73d02c3b 15-Apr-2020 Nicolas Grekas

Fix bug #79447

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

This makes se

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.

show more ...


# 846b6479 03-Jan-2020 Nikita Popov

Throw Error when referencing uninit typed prop in __sleep

Previously this generated a notice, but would likely generate an
Error when unserializing.

Now we treat it with the sam

Throw Error when referencing uninit typed prop in __sleep

Previously this generated a notice, but would likely generate an
Error when unserializing.

Now we treat it with the same distinction as direct property
accesses, i.e. referencing an unset/undefined normal property
stays a notice, while a typed property becomes an Error exception.

This fixed bug #79002.

Closes GH-5050.

show more ...