summaryrefslogtreecommitdiff
path: root/lib/exe/js.php
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2015-01-07 10:47:45 +0100
committerAndreas Gohr <gohr@cosmocode.de>2015-01-07 10:47:45 +0100
commit79e79377626799a77c11aa7849cb9c64305590c8 (patch)
tree0d359f6b0985fd29f2c854d232578881e636b8c1 /lib/exe/js.php
parentcb339ea7ee2b684b0fd0fb948681c66b76a0b4e1 (diff)
downloadrpg-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 'lib/exe/js.php')
-rw-r--r--lib/exe/js.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 793104e81..3f9781e34 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -160,7 +160,7 @@ function js_out(){
* @param string $file filename path to file
*/
function js_load($file){
- if(!@file_exists($file)) return;
+ if(!file_exists($file)) return;
static $loaded = array();
$data = io_readFile($file);
@@ -179,7 +179,7 @@ function js_load($file){
if($ifile{0} != '/') $ifile = dirname($file).'/'.$ifile;
- if(@file_exists($ifile)){
+ if(file_exists($ifile)){
$idata = io_readFile($ifile);
}else{
$idata = '';
@@ -221,10 +221,10 @@ function js_pluginstrings() {
$plugins = plugin_list();
foreach ($plugins as $p){
if (isset($lang)) unset($lang);
- if (@file_exists(DOKU_PLUGIN."$p/lang/en/lang.php")) {
+ if (file_exists(DOKU_PLUGIN."$p/lang/en/lang.php")) {
include DOKU_PLUGIN."$p/lang/en/lang.php";
}
- if (isset($conf['lang']) && $conf['lang']!='en' && @file_exists(DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php")) {
+ if (isset($conf['lang']) && $conf['lang']!='en' && file_exists(DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php")) {
include DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php";
}
if (isset($lang['js'])) {
@@ -245,10 +245,10 @@ function js_pluginstrings() {
function js_templatestrings() {
global $conf;
$templatestrings = array();
- if (@file_exists(tpl_incdir()."lang/en/lang.php")) {
+ if (file_exists(tpl_incdir()."lang/en/lang.php")) {
include tpl_incdir()."lang/en/lang.php";
}
- if (isset($conf['lang']) && $conf['lang']!='en' && @file_exists(tpl_incdir()."lang/".$conf['lang']."/lang.php")) {
+ if (isset($conf['lang']) && $conf['lang']!='en' && file_exists(tpl_incdir()."lang/".$conf['lang']."/lang.php")) {
include tpl_incdir()."lang/".$conf['lang']."/lang.php";
}
if (isset($lang['js'])) {