summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2003-10-07 08:46:16 +0000
committerStanislav Malyshev <stas@php.net>2003-10-07 08:46:16 +0000
commitdd7bdcf4b1abe87b5c7e990c79360416f35052c2 (patch)
treed54f7952bfe2ab031c248798079cbc947fb6a7bd /main/php_variables.c
parent90100e5c9028476486cc5865ce62170239f8c74a (diff)
downloadphp-git-dd7bdcf4b1abe87b5c7e990c79360416f35052c2.tar.gz
Fix $_SERVER['argv'] and $_SERVER['argc']
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c3
1 files changed, 2 insertions, 1 deletions
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);