From 5c1deef2026238ae505d2ee6fd34ab0b9db732c6 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 28 Jul 2006 08:18:24 +0000 Subject: [PATCH] - HEAD does not suppot magic_gpc --- ext/filter/filter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 0ffe3f23a3..3d6477edce 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -378,9 +378,13 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int if (!(IF_G(default_filter) == FILTER_UNSAFE_RAW)) { Z_STRVAL(new_var) = estrndup(*val, val_len + 1); php_zval_filter(&new_var, IF_G(default_filter), IF_G(default_filter_flags), NULL, NULL/*charset*/ TSRMLS_CC); - } else if (PG(magic_quotes_gpc)) { + } +#if PHP_VERSION_ID<60000 + else if (PG(magic_quotes_gpc)) { Z_STRVAL(new_var) = php_addslashes(*val, Z_STRLEN(new_var), &Z_STRLEN(new_var), 0 TSRMLS_CC); - } else { + } +#endif + else { Z_STRVAL(new_var) = estrndup(*val, val_len + 1); } } else { /* empty string */ -- 2.50.1