r28235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28234‎ | r28235 | r28236 >
Date:04:21, 7 December 2007
Author:simetrical
Status:old
Tags:
Comment:
Make it a little clearer in the code that we aren't using STDERR outside command-line mode, by inlining a one-line function that was only called once in the code base.
Modified paths:
  • /trunk/phase3/includes/Exception.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Exception.php
@@ -92,18 +92,13 @@
9393 }
9494 }
9595
96 - /** Print the exception report using text */
97 - function reportText() {
98 - fwrite( STDERR, $this->getText() );
99 - }
100 -
10196 /* Output a report about the exception and takes care of formatting.
10297 * It will be either HTML or plain text based on $wgCommandLineMode.
10398 */
10499 function report() {
105100 global $wgCommandLineMode;
106101 if ( $wgCommandLineMode ) {
107 - $this->reportText();
 102+ fwrite( STDERR, $this->getText() );
108103 } else {
109104 $log = $this->getLogMessage();
110105 if ( $log ) {

Status & tagging log