Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2398,13 +2398,12 @@ |
2399 | 2399 | * using $filename |
2400 | 2400 | */ |
2401 | 2401 | function sourceFile( $filename, $lineCallback = false, $resultCallback = false, $fname = false ) { |
| 2402 | + wfSuppressWarnings(); |
2402 | 2403 | $fp = fopen( $filename, 'r' ); |
| 2404 | + wfRestoreWarnings(); |
2403 | 2405 | |
2404 | 2406 | 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" ); |
2409 | 2408 | } |
2410 | 2409 | |
2411 | 2410 | if ( !$fname ) { |