From: Stanislav Malyshev Date: Tue, 7 Oct 2003 08:46:16 +0000 (+0000) Subject: Fix $_SERVER['argv'] and $_SERVER['argc'] X-Git-Tag: RELEASE_1_3b3~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd7bdcf4b1abe87b5c7e990c79360416f35052c2;p=php Fix $_SERVER['argv'] and $_SERVER['argc'] --- diff --git a/main/php_variables.c b/main/php_variables.c index e20fe4e363..13e21b500c 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -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);