r74028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74027‎ | r74028 | r74029 >
Date:17:26, 30 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Prevent fatal errors with error reporting
Modified paths:
  • /trunk/extensions/Translate/TranslateTasks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateTasks.php
@@ -371,9 +371,13 @@
372372 }
373373
374374 public function output() {
375 - if ( $this->group instanceof FileBasedMessageGroup ) {
 375+ if ( $this->group instanceof MessageGroupBase ) {
376376 $ffs = $this->group->getFFS();
377 - $data = $ffs->writeIntoVariable( $this->collection );
 377+ if ( !$ffs ) {
 378+ $data = 'Not supported';
 379+ } else {
 380+ $data = $ffs->writeIntoVariable( $this->collection );
 381+ }
378382 } else {
379383 $writer = $this->group->getWriter();
380384 $data = $writer->webExport( $this->collection );

Status & tagging log