From: Felipe Pena Date: Sun, 3 Jul 2011 01:06:20 +0000 (+0000) Subject: - Fixed crash when using -e option X-Git-Tag: php-5.4.0alpha2~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3923d02332bf728a10e33de96c8f86b1ea465834;p=php - Fixed crash when using -e option --- diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 6df89d6045..ced0875913 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1569,7 +1569,7 @@ static zend_module_entry cgi_module_entry = { int main(int argc, char *argv[]) { int exit_status = SUCCESS; - int cgi = 0, c; + int cgi = 0, c, use_extended_info = 0; zend_file_handle file_handle; /* temporary locals */ @@ -1678,7 +1678,7 @@ int main(int argc, char *argv[]) break; case 'e': /* enable extended info output */ - CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; + use_extended_info = 1; break; case 't': @@ -1781,6 +1781,10 @@ int main(int argc, char *argv[]) #endif return FAILURE; } + + if (use_extended_info) { + CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; + } /* check force_cgi after startup, so we have proper output */ if (cgi && CGIG(force_redirect)) {