diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index aa2cd0fb3d5b2..3d2ef0148a650 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -62,7 +62,7 @@ called, we cal __call handler. */ -ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */ +ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj) /* {{{ */ { if (!zobj->properties) { zend_property_info *prop_info; @@ -88,6 +88,8 @@ ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */ } } } + + return zobj->properties; } /* }}} */ @@ -130,7 +132,7 @@ ZEND_API HashTable *zend_std_build_object_properties_array(zend_object *zobj) /* ZEND_API HashTable *zend_std_get_properties(zend_object *zobj) /* {{{ */ { if (!zobj->properties) { - rebuild_object_properties_internal(zobj); + return rebuild_object_properties_internal(zobj); } return zobj->properties; } diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 2619b34ef2f7e..730b110eccd37 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -268,12 +268,12 @@ ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj); ZEND_API int zend_std_compare_objects(zval *o1, zval *o2); ZEND_API zend_result zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, bool check_only); /* Use zend_std_get_properties_ex() */ -ZEND_API void rebuild_object_properties_internal(zend_object *zobj); +ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj); -static inline HashTable *zend_std_get_properties_ex(zend_object *object) +static zend_always_inline HashTable *zend_std_get_properties_ex(zend_object *object) { if (!object->properties) { - rebuild_object_properties_internal(object); + return rebuild_object_properties_internal(object); } return object->properties; }