From: Brion Vibber Date: Fri, 28 Oct 2005 09:39:22 +0000 (+0000) Subject: * (bug 3771) Handle internal functions in backtrace in wfAbruptExit() X-Git-Tag: 1.6.0~1285 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=b1daa08cc1f243920bea03580cd8515e154157dc;p=lhc%2Fweb%2Fwiklou.git * (bug 3771) Handle internal functions in backtrace in wfAbruptExit() http://bugzilla.wikimedia.org/attachment.cgi?id=1011 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e96ec0f58b..e8b5fa46cd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -186,6 +186,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 3782) Throw fatal installation warning if mbstring.func_overload on. Why do people invent these crazy options that change language semantics? * (bug 3762) Define missing Special:Import UI messages +* (bug 3771) Handle internal functions in backtrace in wfAbruptExit() === Caveats === diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index f26c95a18b..9513fa3a23 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -468,8 +468,8 @@ function wfAbruptExit( $error = false ){ if( function_exists( 'debug_backtrace' ) ){ // PHP >= 4.3 $bt = debug_backtrace(); for($i = 0; $i < count($bt) ; $i++){ - $file = $bt[$i]['file']; - $line = $bt[$i]['line']; + $file = isset($bt[$i]['file']) ? $bt[$i]['file'] : "unknown"; + $line = isset($bt[$i]['line']) ? $bt[$i]['line'] : "unknown"; wfDebug("WARNING: Abrupt exit in $file at line $line\n"); } } else {