]> granicus.if.org Git - php/commit
Fixed bug #76509
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 22 Jun 2018 10:58:48 +0000 (12:58 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 25 Jun 2018 13:04:09 +0000 (15:04 +0200)
commit2543e61aed67add7522e0b4cdf9a13cf3e441f6f
tree35349a532edd97e52927275f2fe474979df614ec
parent102bcb5c05d91b5138c72df5b118b25c6f9ad383
Fixed bug #76509

In PHP static properties are shared between inheriting classes,
unless they are explicitly overwritten. However, because this
functionality was implemented using reference, it was possible
to break the implementation by reassigning the static property
reference.

This is fixed by switching the implementation from using references
to using INDIRECTs, which cannot be affected by userland code.
13 files changed:
NEWS
UPGRADING
Zend/zend_API.c
Zend/zend_builtin_functions.c
Zend/zend_inheritance.c
Zend/zend_object_handlers.c
Zend/zend_types.h
ext/opcache/zend_accelerator_util_funcs.c
ext/opcache/zend_file_cache.c
ext/opcache/zend_persist.c
ext/opcache/zend_persist_calc.c
ext/reflection/php_reflection.c
tests/classes/static_properties_004.phpt