]> granicus.if.org Git - php/commitdiff
Accept null for preg_quote delimiter argument
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 17 Jun 2019 11:30:15 +0000 (13:30 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 17 Jun 2019 11:30:15 +0000 (13:30 +0200)
Related to bug #78163.

ext/pcre/php_pcre.c

index 2e827298a97e7416bb9d06cd8376f575917a8f27..d7d186540ab23a8c4a50957d275e91e1e058f78e 100644 (file)
@@ -2419,7 +2419,7 @@ static PHP_FUNCTION(preg_quote)
        ZEND_PARSE_PARAMETERS_START(1, 2)
                Z_PARAM_STR(str)
                Z_PARAM_OPTIONAL
-               Z_PARAM_STR(delim)
+               Z_PARAM_STR_EX(delim, 1, 0)
        ZEND_PARSE_PARAMETERS_END();
 
        /* Nothing to do if we got an empty string */