cvs: php4 /main main.c
| From: | Edin Kadribasic | Date: | Thu, 31 Jan 2002 00:05:08 +0000 |
| Subject: | cvs: php4 /main main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9220@lists.php.net to get a copy of this message | ||
edink Wed Jan 30 19:05:08 2002 EDT
Modified files:
/php4/main main.c
Log:
Ignore register_globals for $argc and $argv under CLI SAPI.
Index: php4/main/main.c
diff -u php4/main/main.c:1.419 php4/main/main.c:1.420
--- php4/main/main.c:1.419 Fri Jan 18 22:15:03 2002
+++ php4/main/main.c Wed Jan 30 19:05:07 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.419 2002/01/19 03:15:03 yohgaki Exp $ */
+/* $Id: main.c,v 1.420 2002/01/31 00:05:07 edink Exp $ */
/* {{{ includes
*/
@@ -1251,7 +1251,7 @@
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);