Commit 7f202231435 for php.net
commit 7f2022314358841c9f18e64d065c419cffa41eb8
Author: Gina Peter Banyard <girgias@php.net>
Date: Tue Mar 10 20:13:05 2026 +0000
ext/soap: use zend_string_equals_literal() instead of strcmp() (#21405)
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 648128d9cea..5e3675f875b 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -2439,13 +2439,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
if (style == SOAP_ENCODED) {
if (soap_version == SOAP_1_1) {
smart_str_0(&array_type);
-#if defined(__GNUC__) && __GNUC__ >= 11
- ZEND_DIAGNOSTIC_IGNORED_START("-Wstringop-overread")
-#endif
- bool is_xsd_any_type = strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0;
-#if defined(__GNUC__) && __GNUC__ >= 11
- ZEND_DIAGNOSTIC_IGNORED_END
-#endif
+ bool is_xsd_any_type = zend_string_equals_literal(array_type.s, "xsd:anyType");
if (is_xsd_any_type) {
smart_str_free(&array_type);
smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1);