com php-src: Accept null for preg_quote delimiter argumen t: ext/pcre/php_pcre.c
| From: | Nikita Popov | Date: | Mon, 17 Jun 2019 11:30:15 +0000 |
| Subject: | com php-src: Accept null for preg_quote delimiter argumen t: ext/pcre/php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106832@lists.php.net to get a copy of this message | ||
Commit: 03db04c3aba03fd55c94c9d834a6c151e351cfc5
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 17 Jun 2019 13:30:15 +0200
Parents: 28808ca96d202e63db0c407548f4fb7d4cb46d9f
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=03db04c3aba03fd55c94c9d834a6c151e351cfc5
Log:
Accept null for preg_quote delimiter argument
Related to bug #78163.
Bugs:
https://bugs.php.net/78163
Changed paths:
M ext/pcre/php_pcre.c
Diff:
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 2e82729..d7d1865 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -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 */