dmitry Fri Mar 17 15:04:23 2006 UTC
Modified files:
/php-src/main php_variables.c
/php-src/tests/basic 011.phpt bug29971.phpt
Log:
Fixed register_argc_argv
http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.121&r2=1.122&diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.121 php-src/main/php_variables.c:1.122
--- php-src/main/php_variables.c:1.121 Fri Mar 17 08:59:02 2006
+++ php-src/main/php_variables.c Fri Mar 17 15:04:22 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.121 2006/03/17 08:59:02 dmitry Exp $ */
+/* $Id: php_variables.c,v 1.122 2006/03/17 15:04:22 dmitry Exp $ */
#include <stdio.h>
#include "php.h"
@@ -639,7 +639,7 @@
int count = 0;
char *ss, *space;
- if (!(SG(request_info).argc || track_vars_array)) {
+ if (!(SG(request_info).argc || (s && *s))) {
return;
}
@@ -696,7 +696,7 @@
argc->is_ref = 0;
argc->refcount = 0;
- if (SG(request_info).argc) {
+ if (Z_LVAL_P(argc)) {
arr->refcount++;
argc->refcount++;
zend_hash_update(&EG(symbol_table), "argv", sizeof("argv"),
&arr, sizeof(zval *), NULL);
http://cvs.php.net/viewcvs.cgi/php-src/tests/basic/011.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/tests/basic/011.phpt
diff -u php-src/tests/basic/011.phpt:1.4 php-src/tests/basic/011.phpt:1.5
--- php-src/tests/basic/011.phpt:1.4 Wed Aug 21 23:08:21 2002
+++ php-src/tests/basic/011.phpt Fri Mar 17 15:04:23 2006
@@ -8,16 +8,9 @@
ab+cd+ef+123+test
--FILE--
<?php
-
-if (!ini_get('register_globals')) {
- $argc = $_SERVER['argc'];
- $argv = $_SERVER['argv'];
-}
-
for ($i=0; $i<$argc; $i++) {
echo "$i: ".$argv[$i]."\n";
}
-
?>
--EXPECT--
0: ab
http://cvs.php.net/viewcvs.cgi/php-src/tests/basic/bug29971.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/tests/basic/bug29971.phpt
diff -u php-src/tests/basic/bug29971.phpt:1.3
php-src/tests/basic/bug29971.phpt:1.4
--- php-src/tests/basic/bug29971.phpt:1.3 Tue Jan 17 12:18:53 2006
+++ php-src/tests/basic/bug29971.phpt Fri Mar 17 15:04:23 2006
@@ -2,6 +2,7 @@
Bug #29971 (variables_order behaviour)
--INI--
variables_order=GPC
+register_argc_argv=0
--FILE--
<?php
var_dump($_ENV,$_SERVER);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php