dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
184d8be
)
Fixing typo from r55396 + code styl/whitespace
author
Krinkle
<krinkle@users.mediawiki.org>
Tue, 17 May 2011 21:54:12 +0000
(21:54 +0000)
committer
Krinkle
<krinkle@users.mediawiki.org>
Tue, 17 May 2011 21:54:12 +0000
(21:54 +0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
3536597
..
9c9ea74
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-3211,32
+3211,33
@@
function wfDeprecated( $function ) {
* $wgDevelopmentWarnings
*
* @param $msg String: message to send
* $wgDevelopmentWarnings
*
* @param $msg String: message to send
- * @param $callerOffset Integer: number of it
me
s to go back in the backtrace to
+ * @param $callerOffset Integer: number of it
em
s 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 ) {
* 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();
$callers = wfDebugBacktrace();
- if
( isset( $callers[$callerOffset + 1] ) )
{
+ if
( isset( $callers[$callerOffset + 1] ) )
{
$callerfunc = $callers[$callerOffset + 1];
$callerfile = $callers[$callerOffset];
$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 = '';
$file = $callerfile['file'] . ' at line ' . $callerfile['line'];
} else {
$file = '(internal function)';
}
$func = '';
- if( isset( $callerfunc['class'] ) ) {
+ if
( isset( $callerfunc['class'] ) ) {
$func .= $callerfunc['class'] . '::';
}
$func .= $callerfunc['class'] . '::';
}
- if( isset( $callerfunc['function'] ) ) {
+ if
( isset( $callerfunc['function'] ) ) {
$func .= $callerfunc['function'];
}
$msg .= " [Called from $func in $file]";
}
$func .= $callerfunc['function'];
}
$msg .= " [Called from $func in $file]";
}
- global $wgDevelopmentWarnings;
if ( $wgDevelopmentWarnings ) {
trigger_error( $msg, $level );
} else {
if ( $wgDevelopmentWarnings ) {
trigger_error( $msg, $level );
} else {