Skip to content

Commit 7f20223

Browse files
authored
ext/soap: use zend_string_equals_literal() instead of strcmp() (php#21405)
1 parent 9a73c00 commit 7f20223

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

ext/soap/php_encoding.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,13 +2439,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
24392439
if (style == SOAP_ENCODED) {
24402440
if (soap_version == SOAP_1_1) {
24412441
smart_str_0(&array_type);
2442-
#if defined(__GNUC__) && __GNUC__ >= 11
2443-
ZEND_DIAGNOSTIC_IGNORED_START("-Wstringop-overread")
2444-
#endif
2445-
bool is_xsd_any_type = strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0;
2446-
#if defined(__GNUC__) && __GNUC__ >= 11
2447-
ZEND_DIAGNOSTIC_IGNORED_END
2448-
#endif
2442+
bool is_xsd_any_type = zend_string_equals_literal(array_type.s, "xsd:anyType");
24492443
if (is_xsd_any_type) {
24502444
smart_str_free(&array_type);
24512445
smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1);

0 commit comments

Comments
 (0)