]> granicus.if.org Git - php/commitdiff
A quick attempt to make parse_str($str,$arr) not register globals.
authorStanislav Malyshev <stas@php.net>
Tue, 12 Sep 2000 10:54:45 +0000 (10:54 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 12 Sep 2000 10:54:45 +0000 (10:54 +0000)
ext/standard/string.c

index 8274ea806ce800ac2b99043185ade619edfcae62..34fdd1f061929a7b6931b77ad9240d790465ac85 100644 (file)
@@ -2442,11 +2442,14 @@ PHP_FUNCTION(parse_str)
                php_treat_data(PARSE_STRING, res, NULL ELS_CC PLS_CC SLS_CC);
        else
        {
+               int old_rg = PG(register_globals);
+               PG(register_globals) = 0;
                /* Clear out the array that was passed in. */
                zval_dtor(*arrayArg);
                array_init(*arrayArg);
                
                php_treat_data(PARSE_STRING, res, *arrayArg ELS_CC PLS_CC SLS_CC);
+               PG(register_globals) = old_rg;
        }
 }
 /* }}} */