We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d18803 commit c07640dCopy full SHA for c07640d
ext/opcache/ZendAccelerator.c
@@ -3800,6 +3800,11 @@ static bool preload_try_resolve_constants(zend_class_entry *ce)
3800
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
3801
val = &c->value;
3802
if (Z_TYPE_P(val) == IS_CONSTANT_AST) {
3803
+ /* For deprecated constants, we need to flag the zval for recursion
3804
+ * detection. Make sure the zval is separated out of shm. */
3805
+ if (ZEND_CLASS_CONST_FLAGS(c) & ZEND_ACC_DEPRECATED) {
3806
+ ok = true;
3807
+ }
3808
if (EXPECTED(zend_update_class_constant(c, key, c->ce) == SUCCESS)) {
3809
was_changed = changed = true;
3810
} else {
0 commit comments