From 936b7e8e82463213d953133ecec7da81fe0ee73a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 16 Jan 2004 02:31:26 +0000 Subject: MFH: Fixed Bug #26927 (preg_quote() does not escape \0). --- ext/pcre/php_pcre.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 2cd9f5585c..f72beee583 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1391,6 +1391,11 @@ PHP_FUNCTION(preg_quote) *q++ = c; break; + case '\0': + *q++ = '\\'; + *q++ = '0'; + break; + default: if (quote_delim && c == delim_char) *q++ = '\\'; -- cgit v1.2.1