summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-06 16:01:20 +0000
committerthomascube <thomas@roundcube.net>2008-09-06 16:01:20 +0000
commit7f22f297acb9de8a9b1bc0d22d1e9a07cb6177e6 (patch)
tree5df0e8e3385dfa50f5fc926bd324e743ac7b6b37
parentc5e2d8bc96967cedc5ef173bbcdfba2d8971eab4 (diff)
One error message is enough if template was not found
-rwxr-xr-xprogram/include/rcube_template.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 3fdd81762..9f94194c4 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -303,17 +303,13 @@ class rcube_template extends rcube_html_page
$path = "$skin_path/templates/$name.html";
// read template file
- if (($templ = file_get_contents($path)) === false) {
- ob_start();
- file_get_contents($path);
- $message = ob_get_contents();
- ob_end_clean();
+ if (($templ = @file_get_contents($path)) === false) {
raise_error(array(
'code' => 501,
'type' => 'php',
'line' => __LINE__,
'file' => __FILE__,
- 'message' => 'Error loading template for '.$name.': '.$message
+ 'message' => 'Error loading template for '.$name
), true, true);
return false;
}