felipe Sun, 12 Jun 2011 02:47:48 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312079
Log: - Fixed bug #54680 (missing TRACK_VARS_SERVER check) Bug: http://bugs.php.net/54680 (Open) missing TRACK_VARS_SERVER Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/basic_functions.c Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2011-06-12 02:08:59 UTC (rev 312078) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2011-06-12 02:47:48 UTC (rev 312079) @@ -4258,7 +4258,8 @@ /* Get argv from the global symbol table. We calculate argc ourselves * in order to be on the safe side, even though it is also available * from the symbol table. */ - if ((zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || + if (PG(http_globals)[TRACK_VARS_SERVER] && + (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY ) { int pos = 0; Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-06-12 02:08:59 UTC (rev 312078) +++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2011-06-12 02:47:48 UTC (rev 312079) @@ -4196,7 +4196,8 @@ /* Get argv from the global symbol table. We calculate argc ourselves * in order to be on the safe side, even though it is also available * from the symbol table. */ - if ((zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || + if (PG(http_globals)[TRACK_VARS_SERVER] && + (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY ) { int pos = 0; Modified: php/php-src/trunk/ext/standard/basic_functions.c =================================================================== --- php/php-src/trunk/ext/standard/basic_functions.c 2011-06-12 02:08:59 UTC (rev 312078) +++ php/php-src/trunk/ext/standard/basic_functions.c 2011-06-12 02:47:48 UTC (rev 312079) @@ -4226,7 +4226,8 @@ /* Get argv from the global symbol table. We calculate argc ourselves * in order to be on the safe side, even though it is also available * from the symbol table. */ - if ((zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || + if (PG(http_globals)[TRACK_VARS_SERVER] && + (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY ) { int pos = 0;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php