From 6ebe0ff5e1d697027585b0cead32cb3685d8bb4d Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 25 Apr 2005 13:43:21 +0000 Subject: [PATCH] split off new function wfBacktrace() from wfDebugDieBacktrace() --- includes/GlobalFunctions.php | 81 +++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3c3b199a09..9e334e518e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -467,43 +467,64 @@ function wfErrorExit() { function wfDebugDieBacktrace( $msg = '' ) { global $wgCommandLineMode; - if ( function_exists( 'debug_backtrace' ) ) { + $backtrace = wfBacktrace(); + if ( $backtrace !== false ) { if ( $wgCommandLineMode ) { - $msg .= "\nBacktrace:\n"; + $msg .= "\nBacktrace:\n$backtrace"; } else { - $msg .= "\n

Backtrace:

\n