cvs: php-src(PHP_5_0) / NEWS /main php_variables.c /tests/basic bug29971.phpt
| From: | Dmitry Stogov | Date: | Wed, 25 May 2005 17:41:19 +0000 |
| Subject: | cvs: php-src(PHP_5_0) / NEWS /main php_variables.c /tests/basic bug29971.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-32009@lists.php.net to get a copy of this message | ||
dmitry Wed May 25 13:41:19 2005 EDT
Added files: (Branch: PHP_5_0)
/php-src/tests/basic bug29971.phpt
Modified files:
/php-src NEWS
/php-src/main php_variables.c
Log:
Fixed bug #29971 (variables_order behaviour)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.399&r2=1.1760.2.400&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.399 php-src/NEWS:1.1760.2.400
--- php-src/NEWS:1.1760.2.399 Mon May 23 17:49:48 2005
+++ php-src/NEWS Wed May 25 13:41:17 2005
@@ -113,6 +113,7 @@
(Marcus)
- Fixed bug #29975 (memory leaks when set_error_handler() is used inside error
handler). (Tony)
+- Fixed bug #29971 (variables_order behaviour). (Dmitry)
- Fixed bug #29944 (Function defined in switch, crashes). (Dmitry)
- Fixed bug #29583 (crash when echoing a COM object). (M.Sisolak, Wez)
- Fixed bug #29338 (unencoded spaces get ignored after certain tags). (Ilia)
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.81.2.8&r2=1.81.2.9&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.81.2.8 php-src/main/php_variables.c:1.81.2.9
--- php-src/main/php_variables.c:1.81.2.8 Mon Apr 25 17:18:41 2005
+++ php-src/main/php_variables.c Wed May 25 13:41:18 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.81.2.8 2005/04/25 21:18:41 sniper Exp $ */
+/* $Id: php_variables.c,v 1.81.2.9 2005/05/25 17:41:18 dmitry Exp $ */
#include <stdio.h>
#include "php.h"
@@ -707,7 +707,15 @@
static zend_bool php_auto_globals_create_server(char *name, uint name_len TSRMLS_DC)
{
- php_register_server_variables(TSRMLS_C);
+ if (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s')) {
+ php_register_server_variables(TSRMLS_C);
+ } else {
+ zval *server_vars=NULL;
+ ALLOC_ZVAL(server_vars);
+ array_init(server_vars);
+ INIT_PZVAL(server_vars);
+ PG(http_globals)[TRACK_VARS_SERVER] = server_vars;
+ }
zend_hash_update(&EG(symbol_table), name, name_len+1,
&PG(http_globals)[TRACK_VARS_SERVER], sizeof(zval *), NULL);
PG(http_globals)[TRACK_VARS_SERVER]->refcount++;
@@ -729,7 +737,9 @@
INIT_PZVAL(env_vars);
PG(http_globals)[TRACK_VARS_ENV] = env_vars;
- php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
+ if (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e')) {
+ php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
+ }
zend_hash_update(&EG(symbol_table), name, name_len+1, &PG(http_globals)[TRACK_VARS_ENV],
sizeof(zval *), NULL);
PG(http_globals)[TRACK_VARS_ENV]->refcount++;
http://cvs.php.net/co.php/php-src/tests/basic/bug29971.phpt?r=1.1&p=1
Index: php-src/tests/basic/bug29971.phpt
+++ php-src/tests/basic/bug29971.phpt