]> granicus.if.org Git - php/commitdiff
Small ext/dom cleanups
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Oct 2019 10:15:08 +0000 (11:15 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Oct 2019 10:16:23 +0000 (11:16 +0100)
ext/dom/cdatasection.c
ext/dom/comment.c
ext/dom/document.c
ext/dom/documentfragment.c
ext/dom/element.c
ext/dom/node.c

index 6af743e4e3f4c10c1dc65fd289d1fa86eab2feae..ed6df89cc2a01fb249124f012e59b1ca65c46dd0 100644 (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);
index c4b488888d17e95e7a68bae3a60560e91b8a35af..d415e0139a40415799b7087e4470a2ab0d610a50 100644 (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);
index ede0311b5d369c365a7479805eb45071b4b145ea..8557f14cf3ebd189a7ca2264f686e797472749c8 100644 (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;
 }
 /* }}} */
 
index e84553db4ddf5fbb2dbc4efbe336c24e92504148..dab8dd7185606655621aa58d3022bc706e1804fc 100644 (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);
index b0b070e18a0565e710d7ebdb628909a46947624e..1db915c77f0295f4840d5ac45656a7c9147a12cf 100644 (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) {
index 2e745314677c30b4f110db2daf3a522eb8b5923f..ab2151f290f86269425bd0733eeb1189b3c31acf 100644 (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)
 {