iliaa Thu Sep 1 15:15:52 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main php_variables.c
Log:
MFH: Fixed bug #34331 (php crashes when variables_order is empty).
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.81.2.11&r2=1.81.2.12&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.81.2.11
php-src/main/php_variables.c:1.81.2.12
--- php-src/main/php_variables.c:1.81.2.11 Wed Jun 1 05:43:48 2005
+++ php-src/main/php_variables.c Thu Sep 1 15:15:51 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.81.2.11 2005/06/01 09:43:48 dmitry Exp $ */
+/* $Id: php_variables.c,v 1.81.2.12 2005/09/01 19:15:51 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -720,7 +720,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;
@@ -756,7 +756,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