Skip to content

Commit f4eb81d

Browse files
authored
Followup GH-14996 (#15062)
1 parent 810999a commit f4eb81d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Zend/zend_object_handlers.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
called, we cal __call handler.
6363
*/
6464

65-
ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
65+
ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
6666
{
6767
if (!zobj->properties) {
6868
zend_property_info *prop_info;
@@ -88,6 +88,8 @@ ZEND_API void rebuild_object_properties_internal(zend_object *zobj) /* {{{ */
8888
}
8989
}
9090
}
91+
92+
return zobj->properties;
9193
}
9294
/* }}} */
9395

@@ -130,7 +132,7 @@ ZEND_API HashTable *zend_std_build_object_properties_array(zend_object *zobj) /*
130132
ZEND_API HashTable *zend_std_get_properties(zend_object *zobj) /* {{{ */
131133
{
132134
if (!zobj->properties) {
133-
rebuild_object_properties_internal(zobj);
135+
return rebuild_object_properties_internal(zobj);
134136
}
135137
return zobj->properties;
136138
}

Zend/zend_object_handlers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj);
268268
ZEND_API int zend_std_compare_objects(zval *o1, zval *o2);
269269
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);
270270
/* Use zend_std_get_properties_ex() */
271-
ZEND_API void rebuild_object_properties_internal(zend_object *zobj);
271+
ZEND_API HashTable *rebuild_object_properties_internal(zend_object *zobj);
272272

273-
static inline HashTable *zend_std_get_properties_ex(zend_object *object)
273+
static zend_always_inline HashTable *zend_std_get_properties_ex(zend_object *object)
274274
{
275275
if (!object->properties) {
276-
rebuild_object_properties_internal(object);
276+
return rebuild_object_properties_internal(object);
277277
}
278278
return object->properties;
279279
}

0 commit comments

Comments
 (0)