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/plugincontroller.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/plugincontroller.class.php') diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index dfd4d0a29..ad73e1528 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -177,7 +177,7 @@ class Doku_Plugin_Controller { // disabling mechanism was changed back very soon again // to keep everything simple we just skip the plugin completely continue; - } elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) { + } elseif (file_exists(DOKU_PLUGIN.$plugin.'/disabled')) { /** * treat this as a default disabled plugin(over-rideable by the plugin manager) * @deprecated 2011-09-10 (usage of disabled files) @@ -247,9 +247,9 @@ class Doku_Plugin_Controller { $out .= "\$plugins['$plugin'] = $value;\n"; } // backup current file (remove any existing backup) - if (@file_exists($file)) { + if (file_exists($file)) { $backup = $file.'.bak'; - if (@file_exists($backup)) @unlink($backup); + if (file_exists($backup)) @unlink($backup); if (!@copy($file,$backup)) return false; if (!empty($conf['fperm'])) chmod($backup, $conf['fperm']); } @@ -314,7 +314,7 @@ class Doku_Plugin_Controller { foreach ($master_list as $plugin) { $dir = $this->get_directory($plugin); - if (@file_exists(DOKU_PLUGIN."$dir/$type.php")){ + if (file_exists(DOKU_PLUGIN."$dir/$type.php")){ $plugins[] = $plugin; } else { if ($dp = @opendir(DOKU_PLUGIN."$dir/$type/")) { -- cgit v1.2.3