summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
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++ = '\\';