]> granicus.if.org Git - php/commitdiff
Specify get_property_ptr_ptr handler for DatePeriod
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 29 May 2019 07:51:15 +0000 (09:51 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 May 2019 07:51:15 +0000 (09:51 +0200)
This handler is required on 7.4. Just return NULL from it to fall
back to read_property.

ext/date/php_date.c

index 9aa5343e92c54326b56347daf52409c9f436ba99..94f173be876fcc277b9e6e89d431d0218cc5da79 100644 (file)
@@ -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;
+}
+/* }}} */