]> granicus.if.org Git - php/commitdiff
Fix $_SERVER['argv'] and $_SERVER['argc']
authorStanislav Malyshev <stas@php.net>
Tue, 7 Oct 2003 08:46:16 +0000 (08:46 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 7 Oct 2003 08:46:16 +0000 (08:46 +0000)
main/php_variables.c

index e20fe4e363f3e38ac8915e433aeaafb29de1b3a2..13e21b500c8de2cd99b4abdfa6cc68812e431f5b 100644 (file)
@@ -438,7 +438,8 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC)
                argc->refcount++;
                zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr, sizeof(zval *), NULL);
                zend_hash_add(&EG(symbol_table), "argc", sizeof("argc"), &argc, sizeof(zval *), NULL);
-       } else if (!SG(request_info).argc) {
+       } 
+       if (track_vars_array) {
                arr->refcount++;
                argc->refcount++;
                zend_hash_update(Z_ARRVAL_P(track_vars_array), "argv", sizeof("argv"), &arr, sizeof(pval *), NULL);