From: Edin Kadribasic Date: Sun, 26 May 2002 12:43:20 +0000 (+0000) Subject: Due to the way Zend handles exit() we cannot rely on the return code X-Git-Tag: RELEASE_0_10~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af5663fa501942534705eb1de6e007e83cdf474a;p=php Due to the way Zend handles exit() we cannot rely on the return code of php_execute_script. --- diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 9d40b06e16..657c59a851 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -671,11 +671,8 @@ int main(int argc, char *argv[]) if (strcmp(file_handle.filename, "-")) { cli_register_file_handles(TSRMLS_C); } - if (php_execute_script(&file_handle TSRMLS_CC)) { - exit_status = EG(exit_status); - } else { - exit_status = 255; - } + php_execute_script(&file_handle TSRMLS_CC); + exit_status = EG(exit_status); break; case PHP_MODE_LINT: PG(during_request_startup) = 0;