http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88354
Revision: 88354
Author: krinkle
Date: 2011-05-17 21:54:12 +0000 (Tue, 17 May 2011)
Log Message:
-----------
Fixing typo from r55396 + code styl/whitespace
Modified Paths:
--------------
trunk/phase3/includes/GlobalFunctions.php
Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php 2011-05-17 21:35:18 UTC (rev
88353)
+++ trunk/phase3/includes/GlobalFunctions.php 2011-05-17 21:54:12 UTC (rev
88354)
@@ -3211,32 +3211,33 @@
* $wgDevelopmentWarnings
*
* @param $msg String: message to send
- * @param $callerOffset Integer: number of itmes to go back in the backtrace to
+ * @param $callerOffset Integer: number of items to go back in the backtrace to
* find the correct caller (1 = function calling wfWarn, ...)
* @param $level Integer: PHP error level; only used when
$wgDevelopmentWarnings
* is true
*/
function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
+ global $wgDevelopmentWarnings;
+
$callers = wfDebugBacktrace();
- if( isset( $callers[$callerOffset + 1] ) ){
+ if ( isset( $callers[$callerOffset + 1] ) ) {
$callerfunc = $callers[$callerOffset + 1];
$callerfile = $callers[$callerOffset];
- if( isset( $callerfile['file'] ) && isset( $callerfile['line']
) ) {
+ if ( isset( $callerfile['file'] ) && isset( $callerfile['line']
) ) {
$file = $callerfile['file'] . ' at line ' .
$callerfile['line'];
} else {
$file = '(internal function)';
}
$func = '';
- if( isset( $callerfunc['class'] ) ) {
+ if ( isset( $callerfunc['class'] ) ) {
$func .= $callerfunc['class'] . '::';
}
- if( isset( $callerfunc['function'] ) ) {
+ if ( isset( $callerfunc['function'] ) ) {
$func .= $callerfunc['function'];
}
$msg .= " [Called from $func in $file]";
}
- global $wgDevelopmentWarnings;
if ( $wgDevelopmentWarnings ) {
trigger_error( $msg, $level );
} else {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs