From: <gi...@ma...> - 2010-05-18 01:29:29
|
The branch, master has been updated via b4e8a6647d9e7e7df41968a258051509ec512585 (commit) from 18b995e24c1fe246a2438fe4bc267fda80c4b1bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b4e8a6647d9e7e7df41968a258051509ec512585 Author: John Reese <jr...@le...> Date: Mon May 17 21:27:29 2010 -0400 Fix edge case with event_clear_callbacks In cases where an error would occur before Mantis had fully bootstrapped, it was possible for the error API to generate misleading errors when the event API had not yet been loaded. By wrapping the call to event_clear_callbacks() with a check for function_exists(), it should fix this sort of behavior. ----------------------------------------------------------------------- Summary of changes: core/error_api.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ----------------------------------------------------------------------- commit b4e8a6647d9e7e7df41968a258051509ec512585 Author: John Reese <jr...@le...> Date: Mon May 17 21:27:29 2010 -0400 Fix edge case with event_clear_callbacks In cases where an error would occur before Mantis had fully bootstrapped, it was possible for the error API to generate misleading errors when the event API had not yet been loaded. By wrapping the call to event_clear_callbacks() with a check for function_exists(), it should fix this sort of behavior. diff --git a/core/error_api.php b/core/error_api.php index d24635a..c25b8a5 100644 --- a/core/error_api.php +++ b/core/error_api.php @@ -148,7 +148,9 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) { switch( $t_method ) { case 'halt': # disable any further event callbacks - event_clear_callbacks(); + if ( function_exists( 'event_clear_callbacks' ) ) { + event_clear_callbacks(); + } $t_oblen = ob_get_length(); if( error_handled() && $t_oblen > 0 ) { ----------------------------------------------------------------------- -- Mantis Bug Tracker |