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/plugin.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/plugin.php')
-rw-r--r-- | inc/plugin.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index 9d9b2044c..f2ad95e2e 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -33,7 +33,7 @@ class DokuWiki_Plugin { public function getInfo(){ $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; - if(@file_exists($info)) return confToHash($info); + if(file_exists($info)) return confToHash($info); msg( 'getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.<br />' . @@ -112,9 +112,9 @@ class DokuWiki_Plugin { global $conf; $plugin = $this->getPluginName(); $file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ + if (!file_exists($file)){ $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ + if(!file_exists($file)){ //fall back to english $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; } @@ -137,7 +137,7 @@ class DokuWiki_Plugin { // don't include once, in case several plugin components require the same language file @include($path . 'en/lang.php'); foreach($config_cascade['lang']['plugin'] as $config_file) { - if(@file_exists($config_file . $this->getPluginName() . '/en/lang.php')) { + if(file_exists($config_file . $this->getPluginName() . '/en/lang.php')) { include($config_file . $this->getPluginName() . '/en/lang.php'); } } @@ -145,7 +145,7 @@ class DokuWiki_Plugin { if($conf['lang'] != 'en') { @include($path . $conf['lang'] . '/lang.php'); foreach($config_cascade['lang']['plugin'] as $config_file) { - if(@file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) { + if(file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) { include($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php'); } } @@ -207,7 +207,7 @@ class DokuWiki_Plugin { $path = DOKU_PLUGIN.$this->getPluginName().'/conf/'; $conf = array(); - if (@file_exists($path.'default.php')) { + if (file_exists($path.'default.php')) { include($path.'default.php'); } |