From ba1a9b0e84157917d93bf89c564a050996b5390c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:08:58 +0200 Subject: [PATCH] Cleanup DOMAttr::isId() --- ext/dom/attr.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 9ceb616d17809..5b20796a85ee3 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -193,22 +193,12 @@ Since: DOM Level 3 */ PHP_METHOD(DOMAttr, isId) { - zval *id; dom_object *intern; xmlAttrPtr attrp; - id = ZEND_THIS; - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } - - DOM_GET_OBJ(attrp, id, xmlAttrPtr, intern); - - if (attrp->atype == XML_ATTRIBUTE_ID) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } + ZEND_PARSE_PARAMETERS_NONE(); + DOM_GET_OBJ(attrp, ZEND_THIS, xmlAttrPtr, intern); + RETURN_BOOL(attrp->atype == XML_ATTRIBUTE_ID); } /* }}} end dom_attr_is_id */