1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/dom: Returning a boolean value using RETURN_BOOL (#21141)

This commit is contained in:
Arshid
2026-02-05 22:01:53 +05:30
committed by GitHub
parent 542175ecfa
commit dcf5cd9195

View File

@@ -1326,11 +1326,7 @@ PHP_METHOD(DOMElement, hasAttribute)
DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
attr = dom_get_attribute_or_nsdecl(intern, nodep, BAD_CAST name, name_len);
if (attr == NULL) {
RETURN_FALSE;
} else {
RETURN_TRUE;
}
RETURN_BOOL(attr != NULL);
}
/* }}} end dom_element_has_attribute */