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/template.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/template.php')
-rw-r--r-- | inc/template.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/template.php b/inc/template.php index 3bccb0bd8..646f0873a 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1124,7 +1124,7 @@ function tpl_get_img_meta() { $config_files = getConfigFiles('mediameta'); foreach ($config_files as $config_file) { - if(@file_exists($config_file)) { + if(file_exists($config_file)) { include($config_file); } } @@ -1297,7 +1297,7 @@ function tpl_loadConfig() { $file = tpl_incdir().'/conf/default.php'; $conf = array(); - if(!@file_exists($file)) return false; + if(!file_exists($file)) return false; // load default config file include($file); @@ -1327,7 +1327,7 @@ function tpl_getLang($id) { // don't include once @include($path . 'en/lang.php'); foreach($config_cascade['lang']['template'] as $config_file) { - if(@file_exists($config_file . $conf['template'] . '/en/lang.php')) { + if(file_exists($config_file . $conf['template'] . '/en/lang.php')) { include($config_file . $conf['template'] . '/en/lang.php'); } } @@ -1335,7 +1335,7 @@ function tpl_getLang($id) { if($conf['lang'] != 'en') { @include($path . $conf['lang'] . '/lang.php'); foreach($config_cascade['lang']['template'] as $config_file) { - if(@file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) { + if(file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) { include($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php'); } } @@ -1365,9 +1365,9 @@ function tpl_localeFN($id) { $path = tpl_incdir().'lang/'; global $conf; $file = DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ + if (!file_exists($file)){ $file = $path.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ + if(!file_exists($file)){ //fall back to english $file = $path.'en/'.$id.'.txt'; } |