mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Small ext/dom cleanups
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user