diff options
author | Kosta Harlan <kharlan@wikimedia.org> | 2022-01-04 11:03:09 +0100 |
---|---|---|
committer | Kosta Harlan <kharlan@wikimedia.org> | 2022-01-04 11:03:09 +0100 |
commit | 891b51b258db91626e4f21b3790ec011bf8f56f9 (patch) | |
tree | d28d5dfb1b98c6741a702096d46185016cf9529e /includes/cache/localisation/LocalisationCache.php | |
parent | 0c2cc804e1ebcb4d3f531a09fb549beb37634989 (diff) | |
download | mediawikicore-891b51b258db91626e4f21b3790ec011bf8f56f9.tar.gz mediawikicore-891b51b258db91626e4f21b3790ec011bf8f56f9.zip |
Prefer is_dir/is_file to file_exists
Mirco-optimisation for performance, part II.
Change-Id: Ie8d5332a510bd18456ebc4a851f4d47f6a010dcb
Diffstat (limited to 'includes/cache/localisation/LocalisationCache.php')
-rw-r--r-- | includes/cache/localisation/LocalisationCache.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index cf21a6c0b17a..b13268bc7478 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -725,7 +725,7 @@ class LocalisationCache { protected function readSourceFilesAndRegisterDeps( $code, &$deps ) { // This reads in the PHP i18n file with non-messages l10n data $fileName = $this->langNameUtils->getMessagesFileName( $code ); - if ( !file_exists( $fileName ) ) { + if ( !is_file( $fileName ) ) { $data = []; } else { $deps[] = new FileDependency( $fileName ); |