Skip to content

Commit

Permalink
Only exit if error type is configured to HALT
Browse files Browse the repository at this point in the history
Makes CLI script behave like the web app
  • Loading branch information
dregad committed May 12, 2014
1 parent 1323805 commit 3b7c225
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/error_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {

if( php_sapi_name() == 'cli' ) {
echo $t_error_type . ": " . $t_error_description . "\n";
exit(1);
if( DISPLAY_ERROR_HALT == $t_method ) {
exit(1);
}
}

switch( $t_method ) {
Expand Down

0 comments on commit 3b7c225

Please sign in to comment.