r61672 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61671‎ | r61672 | r61673 >
Date:18:13, 29 January 2010
Author:raymond
Status:ok
Tags:
Comment:
Don't bail out with a PHP Fatal error if table does not exists
Modified paths:
  • /trunk/extensions/Farmer/MediaWikiFarmer_Wiki.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Farmer/MediaWikiFarmer_Wiki.php
@@ -558,6 +558,10 @@
559559
560560 protected function _deleteInterwiki() {
561561 $db = $this->getDatabase();
562 - $db->delete( 'interwiki', array( 'iw_prefix' => strtolower( $this->_title ) ), __METHOD__ );
 562+ if ( $db->tableExists ( 'interwiki' ) ) {
 563+ $db->delete( 'interwiki', array( 'iw_prefix' => strtolower( $this->_title ) ), __METHOD__ );
 564+ } else {
 565+ wfDebug( __METHOD__ . ": Table 'interwiki' does not exists\n" );
 566+ }
563567 }
564568 }

Status & tagging log