Skip to content

Commit 5b754d6

Browse files
committed
Correctly compute object props size if there are no props
1 parent 3b22de8 commit 5b754d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_objects_API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static zend_always_inline size_t zend_object_properties_size(zend_class_entry *c
8484
{
8585
return sizeof(zval) *
8686
(ce->default_properties_count -
87-
((ce->ce_flags & ZEND_ACC_USE_GUARDS) ? 0 : 1));
87+
(ce->default_properties_count ? ((ce->ce_flags & ZEND_ACC_USE_GUARDS) ? 0 : 1) : 0));
8888
}
8989

9090
/* Allocates object type and zeros it, but not the standard zend_object and properties.

0 commit comments

Comments
 (0)