iliaa           Thu Sep  1 15:14:56 2005 EDT

  Modified files:              
    /php-src/main       php_variables.c 
  Log:
  Fixed bug #34331 (php crashes when variables_order is empty).
  
  
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.107&r2=1.108&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.107 php-src/main/php_variables.c:1.108
--- php-src/main/php_variables.c:1.107  Fri Aug 12 09:27:38 2005
+++ php-src/main/php_variables.c        Thu Sep  1 15:14:54 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_variables.c,v 1.107 2005/08/12 13:27:38 dmitry Exp $ */
+/* $Id: php_variables.c,v 1.108 2005/09/01 19:14:54 iliaa Exp $ */
 
 #include <stdio.h>
 #include "php.h"
@@ -969,7 +969,7 @@
 
 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;
@@ -1004,7 +1004,7 @@
        }
        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);
        }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to