]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #34331 (php crashes when variables_order is empty).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 1 Sep 2005 19:15:19 +0000 (19:15 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 1 Sep 2005 19:15:19 +0000 (19:15 +0000)
NEWS
main/php_variables.c

diff --git a/NEWS b/NEWS
index f261455e0fb9b6b222a9965af689dda3299e06ad..0230796c5038ffde5ea8a6c51bceb44a2c915f3d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ PHP                                                                        NEWS
 - Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
 - Fixed bug #34310 (foreach($arr as $c->d => $x) crashes). (Dmitry)
 - Fixed bug #34307 (OnUpdateStringUnempty INI options can be set empty). (Jani)
 - Fixed bug #34306 (wddx_serialize_value() crashes with long array keys). (Jani)
index 507f0526baff0d25b9f220030e19149b65b789df..4479d6cc77fa3d71dba802d345e287e169770a78 100644 (file)
@@ -727,7 +727,7 @@ int php_hash_environment(TSRMLS_D)
 
 static zend_bool php_auto_globals_create_server(char *name, uint name_len TSRMLS_DC)
 {
-       if (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s')) {
+       if (PG(variables_order) && (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s'))) {
                php_register_server_variables(TSRMLS_C);
        } else {
                zval *server_vars=NULL;
@@ -762,7 +762,7 @@ static zend_bool php_auto_globals_create_env(char *name, uint name_len TSRMLS_DC
        }
        PG(http_globals)[TRACK_VARS_ENV] = env_vars;
        
-       if (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e')) {
+       if (PG(variables_order) && (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e'))) {
                php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
        }