summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-24 13:10:03 +0000
committerMarcus Boerger <helly@php.net>2003-08-24 13:10:03 +0000
commitd3473d1f58c3801805ceac5c6c7df839d12c2a04 (patch)
treed6894bbf5392bc02eaca1ecb81a90546bb38d73a /sapi/cli
parent669603f69d7133053e5c1b888caa229c7e5b276a (diff)
downloadphp-git-d3473d1f58c3801805ceac5c6c7df839d12c2a04.tar.gz
- Provide a unified way to display uncaught exceptions, which shows
file/line/message info if possible. - Add zend_eval_string_ex() to be able to handle exceptions in eval'd code. - Use above function to fix memleaks in CLI.
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/php_cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 093621ea3e..864d018cfa 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -945,7 +945,7 @@ int main(int argc, char *argv[])
#endif
case PHP_MODE_CLI_DIRECT:
cli_register_file_handles(TSRMLS_C);
- if (zend_eval_string(exec_direct, NULL, "Command line code" TSRMLS_CC) == FAILURE) {
+ if (zend_eval_string_ex(exec_direct, NULL, "Command line code", 1 TSRMLS_CC) == FAILURE) {
exit_status=254;
}
break;
@@ -958,7 +958,7 @@ int main(int argc, char *argv[])
cli_register_file_handles(TSRMLS_C);
- if (exec_begin && zend_eval_string(exec_begin, NULL, "Command line begin code" TSRMLS_CC) == FAILURE) {
+ if (exec_begin && zend_eval_string_ex(exec_begin, NULL, "Command line begin code", 1 TSRMLS_CC) == FAILURE) {
exit_status=254;
}
ALLOC_ZVAL(argi);
@@ -979,7 +979,7 @@ int main(int argc, char *argv[])
zend_hash_update(&EG(symbol_table), "argn", sizeof("argn"), &argn, sizeof(pval *), NULL);
Z_LVAL_P(argi) = ++index;
if (exec_run) {
- if (zend_eval_string(exec_run, NULL, "Command line run code" TSRMLS_CC) == FAILURE) {
+ if (zend_eval_string_ex(exec_run, NULL, "Command line run code", 1 TSRMLS_CC) == FAILURE) {
exit_status=254;
}
} else {
@@ -995,7 +995,7 @@ int main(int argc, char *argv[])
}
efree(input);
}
- if (exec_end && zend_eval_string(exec_end, NULL, "Command line end code" TSRMLS_CC) == FAILURE) {
+ if (exec_end && zend_eval_string_ex(exec_end, NULL, "Command line end code", 1 TSRMLS_CC) == FAILURE) {
exit_status=254;
}