]> granicus.if.org Git - php/commitdiff
php_tidy_create_node() expects a fixed set of node_types
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 29 Nov 2020 23:53:43 +0000 (00:53 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 30 Nov 2020 09:29:46 +0000 (10:29 +0100)
This static function is not supposed to deal with arbitrary
`node_type`s, so there is no need to do so.

Closes GH-6467.

ext/tidy/tidy.c

index 856a8a2f23c9ad3b7b3d133e030ac56f64ba0221..5b53f655783308986b1c2cf214254115d9e835b3 100644 (file)
@@ -770,9 +770,7 @@ static void php_tidy_create_node(INTERNAL_FUNCTION_PARAMETERS, tidy_base_nodetyp
                        node = tidyGetBody(obj->ptdoc->doc);
                        break;
 
-               default:
-                       RETURN_NULL();
-                       break;
+               EMPTY_SWITCH_DEFAULT_CASE()
        }
 
        if (!node) {