From: Pierre Joye Date: Fri, 28 Jul 2006 08:18:24 +0000 (+0000) Subject: - HEAD does not suppot magic_gpc X-Git-Tag: RELEASE_1_0_0RC1~2188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c1deef2026238ae505d2ee6fd34ab0b9db732c6;p=php - HEAD does not suppot magic_gpc --- 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 */