Skip to content

Commit

Permalink
Fix func name typo for getting stack trace as string
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Feb 6, 2018
1 parent 2aa1c09 commit 7032447
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/rest/index.php
Expand Up @@ -70,7 +70,7 @@
return $p_response->withStatus( $p_exception->getCode(), $p_exception->getMessage() )->withJson( $t_data );
}

$t_stack_as_string = error_stack_track_as_string( $p_exception );
$t_stack_as_string = error_stack_trace_as_string( $p_exception );
$t_error_to_log = $p_exception->getMessage() . "\n" . $t_stack_as_string;
error_log( $t_error_to_log );

Expand Down
2 changes: 1 addition & 1 deletion api/soap/mc_api.php
Expand Up @@ -1070,7 +1070,7 @@ function mc_error_exception_handler( $p_exception ) {
}

if( $t_log ) {
$t_stack_as_string = error_stack_track_as_string( $p_exception );
$t_stack_as_string = error_stack_trace_as_string( $p_exception );
$t_error_to_log = $p_exception->getMessage() . "\n" . $t_stack_as_string;
error_log( $t_error_to_log );
}
Expand Down
6 changes: 3 additions & 3 deletions core/error_api.php
Expand Up @@ -206,7 +206,7 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, array $p_context )
$t_error_description = '';

global $g_exception;
$t_stack_as_string = error_stack_track_as_string();
$t_stack_as_string = error_stack_trace_as_string();
$t_error_to_log = $g_exception->getMessage() . "\n" . $t_stack_as_string;
error_log( $t_error_to_log );
} else {
Expand Down Expand Up @@ -493,7 +493,7 @@ function error_print_context( array $p_context ) {
* @param Exception|null $p_exception The exception to print stack trace for. Null will check last seen exception.
* @return string multi-line printout of stack trace.
*/
function error_stack_track_as_string( $p_exception = null ) {
function error_stack_trace_as_string( $p_exception = null ) {
$t_stack = error_stack_trace( $p_exception );
$t_output = '';

Expand Down Expand Up @@ -528,7 +528,7 @@ function error_print_stack_trace( $p_exception = null ) {
$t_stack = error_stack_trace( $p_exception );

if( php_sapi_name() == 'cli' ) {
echo error_stack_track_as_string( $p_exception );
echo error_stack_trace_as_string( $p_exception );
return;
}

Expand Down

0 comments on commit 7032447

Please sign in to comment.