Small ext/dom cleanups

This commit is contained in:
Nikita Popov 2019-10-29 11:15:08 +01:00
parent 312ecc69d5
commit 504f7ffdd6
6 changed files with 9 additions and 10 deletions

View file

@ -58,7 +58,7 @@ PHP_METHOD(domcdatasection, __construct)
if (!nodep) {
php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
return;
}
intern = Z_DOMOBJ_P(ZEND_THIS);

View file

@ -58,7 +58,7 @@ PHP_METHOD(domcomment, __construct)
if (!nodep) {
php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
return;
}
intern = Z_DOMOBJ_P(ZEND_THIS);

View file

@ -1270,7 +1270,7 @@ PHP_METHOD(domdocument, __construct)
if (!docp) {
php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
return;
}
if (encoding_len > 0) {
@ -2258,7 +2258,6 @@ PHP_METHOD(domdocument, registerNodeClass)
}
zend_throw_error(NULL, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name));
RETURN_FALSE;
}
/* }}} */

View file

@ -59,7 +59,7 @@ PHP_METHOD(domdocumentfragment, __construct)
if (!nodep) {
php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
return;
}
intern = Z_DOMOBJ_P(ZEND_THIS);

View file

@ -165,7 +165,7 @@ PHP_METHOD(domelement, __construct)
name_valid = xmlValidateName((xmlChar *) name, 0);
if (name_valid != 0) {
php_dom_throw_error(INVALID_CHARACTER_ERR, 1);
RETURN_FALSE;
return;
}
/* Namespace logic is separate and only when uri passed in to insure no BC breakage */
@ -187,7 +187,7 @@ PHP_METHOD(domelement, __construct)
xmlFreeNode(nodep);
}
php_dom_throw_error(errorcode, 1);
RETURN_FALSE;
return;
}
} else {
/* If you don't pass a namespace uri, then you can't set a prefix */
@ -196,14 +196,14 @@ PHP_METHOD(domelement, __construct)
xmlFree(localname);
xmlFree(prefix);
php_dom_throw_error(NAMESPACE_ERR, 1);
RETURN_FALSE;
return;
}
nodep = xmlNewNode(NULL, (xmlChar *) name);
}
if (!nodep) {
php_dom_throw_error(INVALID_STATE_ERR, 1);
RETURN_FALSE;
return;
}
if (value_len > 0) {

View file

@ -1820,7 +1820,7 @@ PHP_METHOD(domnode, C14NFile)
}
/* }}} */
/* {{{ proto int DOMNode::getNodePath()
/* {{{ proto string|null DOMNode::getNodePath()
Gets an xpath for a node */
PHP_METHOD(domnode, getNodePath)
{