From 27205bd3c3de28e0b0d41f0cd6f61df20f29f965 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:19:54 +0200 Subject: [PATCH] Cleanup DOMAttr::isId() (#15016) --- 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 9ceb616d178..5b20796a85e 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 */