From 7f22f297acb9de8a9b1bc0d22d1e9a07cb6177e6 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 6 Sep 2008 16:01:20 +0000 Subject: One error message is enough if template was not found --- program/include/rcube_template.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'program/include/rcube_template.php') 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; } -- cgit v1.2.3