From: Edin Kadribasic Date: Thu, 31 Jan 2002 00:05:07 +0000 (+0000) Subject: Ignore register_globals for $argc and $argv under CLI SAPI. X-Git-Tag: PRE_ISSET_PATCH~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4972fac567ea61422ec4c14683035130f6268f8e;p=php Ignore register_globals for $argc and $argv under CLI SAPI. --- diff --git a/main/main.c b/main/main.c index 296b2d687e..e6844cc941 100644 --- a/main/main.c +++ b/main/main.c @@ -1251,7 +1251,7 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC) Z_TYPE_P(argc) = IS_LONG; INIT_PZVAL(argc); - if (PG(register_globals)) { + if (PG(register_globals) || SG(request_info).argc) { arr->refcount++; argc->refcount++; zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"), &arr, sizeof(zval *), NULL);