From: Timo Tijhof Date: Fri, 11 Oct 2013 18:18:07 +0000 (+0200) Subject: exception: Account for $call['file'] and $call['line'] being unset X-Git-Tag: 1.31.0-rc.0~18539^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=3ca7f919e01617c4685efce285299aa351ff1dac;p=lhc%2Fweb%2Fwiklou.git exception: Account for $call['file'] and $call['line'] being unset Bug: 55634 Change-Id: I1173216cade73216848816f6bb51e54096abdfde --- diff --git a/includes/Exception.php b/includes/Exception.php index 39fe6f4b30..6724c4adec 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -737,7 +737,15 @@ class MWExceptionHandler { } } - $finalExceptionText .= "#{$i} {$call['file']}({$call['line']}): "; + if ( isset( $call['file'] ) && isset( $call['line'] ) ) { + $finalExceptionText .= "#{$i} {$call['file']}({$call['line']}): "; + } else { + // 'file' and 'line' are unset for calls via call_user_func (bug 55634) + // This matches behaviour of Exception::getTraceAsString to instead + // display "[internal function]". + $finalExceptionText .= "#{$i} [internal function]: "; + } + if ( isset( $call['class'] ) ) { $finalExceptionText .= $call['class'] . $call['type'] . $call['function']; } else {