From: Felipe Pena Date: Sun, 12 Jun 2011 02:47:48 +0000 (+0000) Subject: - Fixed bug #54680 (missing TRACK_VARS_SERVER check) X-Git-Tag: php-5.5.0alpha1~1951 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d4a35f3e94e9b7ad6c4d0d6c097aebee1ac5362;p=php - Fixed bug #54680 (missing TRACK_VARS_SERVER check) --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index df2d56f491..ee74bd2959 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4226,7 +4226,8 @@ PHP_FUNCTION(getopt) /* 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;