diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2015-01-07 10:47:45 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2015-01-07 10:47:45 +0100 |
commit | 79e79377626799a77c11aa7849cb9c64305590c8 (patch) | |
tree | 0d359f6b0985fd29f2c854d232578881e636b8c1 /inc/infoutils.php | |
parent | cb339ea7ee2b684b0fd0fb948681c66b76a0b4e1 (diff) | |
download | rpg-79e79377626799a77c11aa7849cb9c64305590c8.tar.gz rpg-79e79377626799a77c11aa7849cb9c64305590c8.tar.bz2 |
Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r-- | inc/infoutils.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php index 399963176..fe312d13f 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -58,7 +58,7 @@ function checkUpdateMessages(){ function getVersionData(){ $version = array(); //import version string - if(@file_exists(DOKU_INC.'VERSION')){ + if(file_exists(DOKU_INC.'VERSION')){ //official release $version['date'] = trim(io_readfile(DOKU_INC.'VERSION')); $version['type'] = 'Release'; @@ -141,20 +141,20 @@ function check(){ if(is_writable($conf['changelog'])){ msg('Changelog is writable',1); }else{ - if (@file_exists($conf['changelog'])) { + if (file_exists($conf['changelog'])) { msg('Changelog is not writable',-1); } } - if (isset($conf['changelog_old']) && @file_exists($conf['changelog_old'])) { + if (isset($conf['changelog_old']) && file_exists($conf['changelog_old'])) { msg('Old changelog exists', 0); } - if (@file_exists($conf['changelog'].'_failed')) { + if (file_exists($conf['changelog'].'_failed')) { msg('Importing old changelog failed', -1); - } else if (@file_exists($conf['changelog'].'_importing')) { + } else if (file_exists($conf['changelog'].'_importing')) { msg('Importing old changelog now.', 0); - } else if (@file_exists($conf['changelog'].'_import_ok')) { + } else if (file_exists($conf['changelog'].'_import_ok')) { msg('Old changelog imported', 1); if (!plugin_isdisabled('importoldchangelog')) { msg('Importoldchangelog plugin not disabled after import', -1); |