From e29166b3db84c07ed95eec5fa652a531f40c41e1 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Thu, 29 May 2025 15:02:05 +0100 Subject: [PATCH] ext/soap: Replace single usage of CHECK_XML_NULL with FIND_XML_NULL This removes the implicit assumption about the variable name of the zval Moreover, nearby the FIND_XML_NULL macro is used anyway. --- ext/soap/php_encoding.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 67543259994f3..ac9713afb3f45 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -112,22 +112,6 @@ static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type); } \ } -#define CHECK_XML_NULL(xml) \ - { \ - xmlAttrPtr null; \ - if (!xml) { \ - ZVAL_NULL(ret); \ - return ret; \ - } \ - if (xml->properties) { \ - null = get_attribute(xml->properties, "nil"); \ - if (null) { \ - ZVAL_NULL(ret); \ - return ret; \ - } \ - } \ - } - #define FIND_ZVAL_NULL(zval, xml, style) \ { \ if (!zval || Z_TYPE_P(zval) == IS_NULL) { \ @@ -1480,7 +1464,7 @@ static zval *to_zval_object_ex(zval *ret, encodeTypePtr type, xmlNodePtr data, z sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST && sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) { - CHECK_XML_NULL(data); + FIND_XML_NULL(data, ret); if (soap_check_xml_ref(ret, data)) { return ret; }