r34287 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34286‎ | r34287 | r34288 >
Date:00:59, 6 May 2008
Author:tstarling
Status:old
Tags:
Comment:
Send wfDeprecated notices to the debug log only. We don't actually want to fix all of these occurrences.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2547,6 +2547,10 @@
25482548 * @return null
25492549 */
25502550 function wfDeprecated( $function ) {
 2551+ global $wgDebugLogFile;
 2552+ if ( !$wgDebugLogFile ) {
 2553+ return;
 2554+ }
25512555 $callers = wfDebugBacktrace();
25522556 if( isset( $callers[2] ) ){
25532557 $callerfunc = $callers[2];
@@ -2560,10 +2564,11 @@
25612565 if( isset( $callerfunc['class'] ) )
25622566 $func .= $callerfunc['class'] . '::';
25632567 $func .= @$callerfunc['function'];
2564 - trigger_error( "Use of $function is deprecated. Called from $func in $file", E_USER_NOTICE );
 2568+ $msg = "Use of $function is deprecated. Called from $func in $file";
25652569 } else {
2566 - trigger_error( "Use of $function is deprecated.", E_USER_NOTICE );
 2570+ $msg = "Use of $function is deprecated.";
25672571 }
 2572+ wfDebug( "$msg\n" );
25682573 }
25692574
25702575 /**

Status & tagging log