Skip to content

Commit dcf5cd9

Browse files
authored
ext/dom: Returning a boolean value using RETURN_BOOL (#21141)
1 parent 542175e commit dcf5cd9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

ext/dom/element.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,11 +1326,7 @@ PHP_METHOD(DOMElement, hasAttribute)
13261326
DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
13271327

13281328
attr = dom_get_attribute_or_nsdecl(intern, nodep, BAD_CAST name, name_len);
1329-
if (attr == NULL) {
1330-
RETURN_FALSE;
1331-
} else {
1332-
RETURN_TRUE;
1333-
}
1329+
RETURN_BOOL(attr != NULL);
13341330
}
13351331
/* }}} end dom_element_has_attribute */
13361332

0 commit comments

Comments
 (0)