]> granicus.if.org Git - php/commit
Throw Error when referencing uninit typed prop in __sleep
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 3 Jan 2020 14:35:10 +0000 (15:35 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 6 Jan 2020 17:47:27 +0000 (18:47 +0100)
commit846b6479537a112d1ded725e6484e46462048b35
tree10a6c533aa98c75eef23a2d37ef07dbbc8f6ba75
parent56306cc4af0f7fad8c50d56bfc95a05e0ed920b6
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.
NEWS
ext/standard/tests/serialize/sleep_uninitialized_typed_prop.phpt [new file with mode: 0644]
ext/standard/var.c