Fix GH-18534: FPM exit code 70 with enabled opcache and hooked properties in traits

The trait handling for property hooks in preloading did not exist, we
add a check to skip trait clones and we add the necessary code to update
the op arrays.

Closes GH-18586.
This commit is contained in:
Niels Dossche 2025-05-18 13:45:16 +02:00
parent 43915b302c
commit 6b795f64a5
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
6 changed files with 93 additions and 17 deletions

View file

@ -2976,6 +2976,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
}
}
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
ce->num_hooked_props++;
}
} ZEND_HASH_FOREACH_END();
}