From 3bd5b83615d47e480840d50fcaab31a5463cb314 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 29 May 2019 09:51:15 +0200 Subject: [PATCH] Specify get_property_ptr_ptr handler for DatePeriod This handler is required on 7.4. Just return NULL from it to fall back to read_property. --- ext/date/php_date.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 9aa5343e92..94f173be87 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -662,6 +662,7 @@ static zval *date_interval_write_property(zval *object, zval *member, zval *valu static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot); static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv); static zval *date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot); +static zval *date_period_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot); /* {{{ Module struct */ zend_module_entry date_module_entry = { @@ -2178,7 +2179,7 @@ static void date_register_classes(void) /* {{{ */ date_object_handlers_period.free_obj = date_object_free_storage_period; date_object_handlers_period.clone_obj = date_object_clone_period; date_object_handlers_period.get_properties = date_object_get_properties_period; - date_object_handlers_period.get_property_ptr_ptr = NULL; + date_object_handlers_period.get_property_ptr_ptr = date_period_get_property_ptr_ptr; date_object_handlers_period.get_gc = date_object_get_gc_period; date_object_handlers_period.read_property = date_period_read_property; date_object_handlers_period.write_property = date_period_write_property; @@ -5344,3 +5345,11 @@ static zval *date_period_write_property(zval *object, zval *member, zval *value, return value; } /* }}} */ + +/* {{{ date_period_get_property_ptr_ptr */ +static zval *date_period_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) +{ + /* Fall back to read_property handler. */ + return NULL; +} +/* }}} */ -- 2.40.0