summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-07-22 11:25:30 +0000
committerPierre Joye <pajoye@php.net>2011-07-22 11:25:30 +0000
commit9805e1674aefbc9e2a529a7351a045dab0282eb4 (patch)
tree05cd4674efea52fbd134237f26ef48b57f67a9b6 /ext/zlib/zlib.c
parent8bfb9bcd0171eb6e578f1fc8f79e07c83fbcb403 (diff)
downloadphp-git-9805e1674aefbc9e2a529a7351a045dab0282eb4.tar.gz
- remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 08450a3aa3..0f61bfde91 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -426,7 +426,7 @@ static PHP_FUNCTION(gzfile)
char *filename;
int filename_len;
int flags = REPORT_ERRORS;
- char *slashed, buf[8192] = {0};
+ char buf[8192] = {0};
register int i = 0;
long use_include_path = 0;
php_stream *stream;
@@ -454,14 +454,7 @@ static PHP_FUNCTION(gzfile)
memset(buf, 0, sizeof(buf));
while (php_stream_gets(stream, buf, sizeof(buf) - 1) != NULL) {
- if (PG(magic_quotes_runtime)) {
- int len;
-
- slashed = php_addslashes(buf, 0, &len, 0 TSRMLS_CC); /* 0 = don't free source string */
- add_index_stringl(return_value, i++, slashed, len, 0);
- } else {
- add_index_string(return_value, i++, buf, 1);
- }
+ add_index_string(return_value, i++, buf, 1);
}
php_stream_close(stream);
}