]> granicus.if.org Git - php/commitdiff
- HEAD does not suppot magic_gpc
authorPierre Joye <pajoye@php.net>
Fri, 28 Jul 2006 08:18:24 +0000 (08:18 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 28 Jul 2006 08:18:24 +0000 (08:18 +0000)
ext/filter/filter.c

index 0ffe3f23a3a0a26b29707818b91f8da96ef8ee54..3d6477edce47a8de4cfccc06970dc6df22b96144 100644 (file)
@@ -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 */