r78533 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78532‎ | r78533 | r78534 >
Date:15:40, 17 December 2010
Author:demon
Status:ok
Tags:
Comment:
Installer can handle exceptions now, also suppress possible permission errors with fopen()
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -2398,13 +2398,12 @@
23992399 * using $filename
24002400 */
24012401 function sourceFile( $filename, $lineCallback = false, $resultCallback = false, $fname = false ) {
 2402+ wfSuppressWarnings();
24022403 $fp = fopen( $filename, 'r' );
 2404+ wfRestoreWarnings();
24032405
24042406 if ( false === $fp ) {
2405 - if ( !defined( "MEDIAWIKI_INSTALL" ) )
2406 - throw new MWException( "Could not open \"{$filename}\".\n" );
2407 - else
2408 - return "Could not open \"{$filename}\".\n";
 2407+ throw new MWException( "Could not open \"{$filename}\".\n" );
24092408 }
24102409
24112410 if ( !$fname ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r78534Same as r78533, but 5 lines downdemon15:43, 17 December 2010

Status & tagging log