summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-01-16 02:31:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-01-16 02:31:26 +0000
commit936b7e8e82463213d953133ecec7da81fe0ee73a (patch)
tree19536c42520059728bacf396d8011e8d03f8fb66 /ext/pcre/php_pcre.c
parent41904eb4b29df9801e0a1ccf3d7c442b95b24b44 (diff)
downloadphp-git-936b7e8e82463213d953133ecec7da81fe0ee73a.tar.gz
MFH: 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 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++ = '\\';