felipe Sat, 25 Jun 2011 20:40:03 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312467
Log:
- Fixed crash when using -e option
Changed paths:
U php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
U php/php-src/trunk/sapi/cli/php_cli.c
Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-06-25 20:27:14 UTC
(rev 312466)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-06-25 20:40:03 UTC
(rev 312467)
@@ -1196,7 +1196,7 @@
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 @@
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 @@
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
Modified: php/php-src/trunk/sapi/cli/php_cli.c
===================================================================
--- php/php-src/trunk/sapi/cli/php_cli.c 2011-06-25 20:27:14 UTC (rev
312466)
+++ php/php-src/trunk/sapi/cli/php_cli.c 2011-06-25 20:40:03 UTC (rev
312467)
@@ -1196,7 +1196,7 @@
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 @@
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 @@
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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php