diff options
author | Felipe Pena <felipe@php.net> | 2011-06-25 20:40:03 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-06-25 20:40:03 +0000 |
commit | 5304004cc7577b01ccf82634326d3104887b0ce1 (patch) | |
tree | b5c748a2338263d161c25fab038787d8fb2c92df /sapi/cli/php_cli.c | |
parent | 29588a6fa356dec9b76108e3bcc5a30483308c84 (diff) | |
download | php-git-5304004cc7577b01ccf82634326d3104887b0ce1.tar.gz |
- Fixed crash when using -e option
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 |