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

Cleanup DOMAttr::isId() (#15016)

This commit is contained in:
Niels Dossche
2024-07-18 21:19:54 +02:00
committed by GitHub
parent 5905857fd2
commit 27205bd3c3

View File

@@ -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 */