- Opcache:
. Fixed bug #78341 (Failure to detect smart branch in DFA pass). (Nikita)
+ . Fixed bug #78376 (Incorrect preloading of constant static properties).
+ (Dmitry)
- PCRE:
. Fixed bug #78338 (Array cross-border reading in PCRE). (cmb)
ZEND_ASSERT(ce->ce_flags & ZEND_ACC_PRELOADED);
if (ce->default_static_members_count) {
zend_cleanup_internal_class_data(ce);
+ if (ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED) {
+ int i;
+
+ for (i = 0; i < ce->default_static_members_count; i++) {
+ if (Z_TYPE(ce->default_static_members_table[i]) == IS_CONSTANT_AST) {
+ ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
+ break;
+ }
+ }
+ }
}
if (ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS) {
zend_op_array *op_array;
--- /dev/null
+--TEST--
+Bug #78376 (Incorrect preloading of constant static properties)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.preload={PWD}/preload_bug78376.inc
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+var_dump(\A::$a);
+?>
+--EXPECT--
+string(4) "aaaa"
\ No newline at end of file
--- /dev/null
+<?php
+const CNST = 'aaaa';
+class A {
+ public static $a = CNST;
+}
+$a = \A::$a;