summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-01-16 02:29:50 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-01-16 02:29:50 +0000
commit071565178549a718e9a19c6f659723b22a49cb8f (patch)
treec373b2d9698264ea753b4f492fd54d98428844aa /ext/pcre/php_pcre.c
parentc1ac285760eb9e9aee5bdff5b2b4960274970968 (diff)
downloadphp-git-071565178549a718e9a19c6f659723b22a49cb8f.tar.gz
Fixed Bug #26927 (preg_quote() does not escape \0).
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 7e85410299..13c28b886d 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1388,6 +1388,11 @@ PHP_FUNCTION(preg_quote)
*q++ = c;
break;
+ case '\0':
+ *q++ = '\\';
+ *q++ = '0';
+ break;
+
default:
if (quote_delim && c == delim_char)
*q++ = '\\';