From: Felipe Pena Date: Sat, 25 Jun 2011 20:40:03 +0000 (+0000) Subject: - Fixed crash when using -e option X-Git-Tag: php-5.4.0alpha2~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5304004cc7577b01ccf82634326d3104887b0ce1;p=php - Fixed crash when using -e option --- diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 14ac439a86..81a2d25959 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1196,7 +1196,7 @@ int main(int argc, char *argv[]) int exit_status = SUCCESS; int module_started = 0, sapi_started = 0; char *php_optarg = NULL; - int php_optind = 1; + int php_optind = 1, use_extended_info = 0; char *ini_path_override = NULL; char *ini_entries = NULL; int ini_entries_len = 0; @@ -1301,7 +1301,7 @@ int main(int argc, char *argv[]) sapi_module = &cli_sapi_module; goto exit_loop; case 'e': /* enable extended info output */ - CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; + use_extended_info = 1; break; } } @@ -1343,6 +1343,11 @@ exit_loop: goto out; } module_started = 1; + + /* -e option */ + if (use_extended_info) { + CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; + } zend_first_try { #ifndef PHP_CLI_WIN32_NO_CONSOLE