Skip to content

Commit 85595cc

Browse files
committed
Compatibility with object handler changes in PHP 8
1 parent 11e2500 commit 85595cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ast.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,13 @@ static const ast_flag_info flag_info[] = {
259259
};
260260

261261
static inline void ast_update_property(zval *object, zend_string *name, zval *value, void **cache_slot) {
262+
#if PHP_VERSION_ID < 80000
262263
zval name_zv;
263264
ZVAL_STR(&name_zv, name);
264-
265265
Z_OBJ_HT_P(object)->write_property(object, &name_zv, value, cache_slot);
266+
#else
267+
Z_OBJ_HT_P(object)->write_property(Z_OBJ_P(object), name, value, cache_slot);
268+
#endif
266269
}
267270

268271
static inline void ast_update_property_long(zval *object, zend_string *name, zend_long value_raw, void **cache_slot) {

0 commit comments

Comments
 (0)