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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user