diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-07-10 17:36:59 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-07-10 17:36:59 +0000 |
commit | e5ae1698cac8f0eb222e23170cf3459bdff103c5 (patch) | |
tree | 3bcb69ffac15fc90433c75198c91bf1df58584fe /phpBB/includes/acm/acm_file.php | |
parent | d81f96877ffc873722e30298bbec96d5d26d9717 (diff) | |
download | forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.gz forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.bz2 forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.tar.xz forums-e5ae1698cac8f0eb222e23170cf3459bdff103c5.zip |
more failsafe "glob()" method.
git-svn-id: file:///svn/phpbb/trunk@7863 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm/acm_file.php')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 63eaa341f5..64a85db0b0 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -39,7 +39,7 @@ class acm global $phpEx; if (file_exists($this->cache_dir . 'data_global.' . $phpEx)) { - include($this->cache_dir . 'data_global.' . $phpEx); + @include($this->cache_dir . 'data_global.' . $phpEx); } else { @@ -159,7 +159,7 @@ class acm return false; } - include($this->cache_dir . "data{$var_name}.$phpEx"); + @include($this->cache_dir . "data{$var_name}.$phpEx"); return (isset($data)) ? $data : false; } else @@ -256,7 +256,12 @@ class acm } // The following method is more failproof than simply assuming the query is on line 3 (which it should be) - $check_line = file_get_contents($this->cache_dir . $entry); + $check_line = @file_get_contents($this->cache_dir . $entry); + + if (empty($check_line)) + { + continue; + } // Now get the contents between /* and */ $check_line = substr($check_line, strpos($check_line, '/* ') + 3, strpos($check_line, ' */') - strpos($check_line, '/* ') - 3); |