[php-src] master: Voidify zend_std_unset_static_property() (#22809)

Gina Peter Banyard via GitHub <[email protected]> Sun, 19 Jul 2026 16:52:38 +0000
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-07-19T17:52:35+01:00

Commit: https://github.com/php/php-src/commit/6210d5cf26091e2cdb91b4141b176dd2e5371114
Raw diff: https://github.com/php/php-src/commit/6210d5cf26091e2cdb91b4141b176dd2e5371114.diff

Voidify zend_std_unset_static_property() (#22809)

Changed paths:
  M  Zend/zend_object_handlers.c
  M  Zend/zend_object_handlers.h


Diff:

diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 9e993627a74a..7ccd9f26190a 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -2178,10 +2178,9 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
 	return zend_std_get_static_property_with_info(ce, property_name, type, &prop_info);
 }
 
-ZEND_API ZEND_COLD bool zend_std_unset_static_property(const zend_class_entry *ce, const zend_string *property_name) /* {{{ */
+ZEND_API ZEND_COLD void zend_std_unset_static_property(const zend_class_entry *ce, const zend_string *property_name) /* {{{ */
 {
 	zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
-	return 0;
 }
 /* }}} */
 
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 8ed4803c3f0e..d41ae01bf700 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -249,7 +249,7 @@ ZEND_API void zend_class_init_statics(zend_class_entry *ce);
 ZEND_API zend_function *zend_std_get_static_method(const zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
 ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend_string *property_name, int type, struct _zend_property_info **prop_info);
 ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, int type);
-ZEND_API ZEND_COLD bool zend_std_unset_static_property(const zend_class_entry *ce, const zend_string *property_name);
+ZEND_API ZEND_COLD void zend_std_unset_static_property(const zend_class_entry *ce, const zend_string *property_name);
 ZEND_API zend_function *zend_std_get_constructor(zend_object *object);
 ZEND_API struct _zend_property_info *zend_get_property_info(const zend_class_entry *ce, zend_string *member, int silent);
 ZEND_API HashTable *zend_std_get_properties(zend_object *object);