From 79e79377626799a77c11aa7849cb9c64305590c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Jan 2015 10:47:45 +0100 Subject: 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. --- inc/infoutils.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/infoutils.php') 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); -- cgit v1.2.3