From 7d3e6dbdb8bbabc297c37095b8a9a35b54107c10 Mon Sep 17 00:00:00 2001 From: thomasb Date: Sat, 6 Sep 2008 16:01:20 +0000 Subject: One error message is enough if template was not found git-svn-id: https://svn.roundcube.net/trunk@1750 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_template.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index 3fdd81762..9f94194c4 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/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