r61950 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61949‎ | r61950 | r61951 >
Date:19:55, 3 February 2010
Author:maxsem
Status:ok
Tags:
Comment:
DatabaseSqlite: avoid fatals with non-zero $failFunction
Modified paths:
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -80,9 +80,12 @@
8181 }
8282
8383 }
84 - $this->mOpened = $this->mConn;
 84+ $this->mOpened = !!$this->mConn;
8585 # set error codes only, don't raise exceptions
86 - $this->mConn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
 86+ if ( $this->mOpened ) {
 87+ $this->mConn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT );
 88+ return true;
 89+ }
8790 }
8891
8992 /**

Status & tagging log