dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "registration: Avoid redundant LBYL check in ExtensionRegistry::queue()"
[lhc/web/wiklou.git]
/
includes
/
registration
/
ExtensionRegistry.php
diff --git
a/includes/registration/ExtensionRegistry.php
b/includes/registration/ExtensionRegistry.php
index
07fe318
..
c5d4b4a
100644
(file)
--- a/
includes/registration/ExtensionRegistry.php
+++ b/
includes/registration/ExtensionRegistry.php
@@
-1,6
+1,7
@@
<?php
use Composer\Semver\Semver;
<?php
use Composer\Semver\Semver;
+use Wikimedia\AtEase\AtEase;
use Wikimedia\ScopedCallback;
use MediaWiki\Shell\Shell;
use MediaWiki\ShellDisabledError;
use Wikimedia\ScopedCallback;
use MediaWiki\Shell\Shell;
use MediaWiki\ShellDisabledError;
@@
-126,15
+127,13
@@
class ExtensionRegistry {
$mtime = $wgExtensionInfoMTime;
if ( $mtime === false ) {
$mtime = $wgExtensionInfoMTime;
if ( $mtime === false ) {
- if ( file_exists( $path ) ) {
- $mtime = filemtime( $path );
- } else {
- throw new Exception( "$path does not exist!" );
- }
+ AtEase::suppressWarnings();
+ $mtime = filemtime( $path );
+ AtEase::restoreWarnings();
// @codeCoverageIgnoreStart
if ( $mtime === false ) {
$err = error_get_last();
// @codeCoverageIgnoreStart
if ( $mtime === false ) {
$err = error_get_last();
- throw new Exception( "
Couldn't stat
$path: {$err['message']}" );
+ throw new Exception( "
Unable to open file
$path: {$err['message']}" );
// @codeCoverageIgnoreEnd
}
}
// @codeCoverageIgnoreEnd
}
}