From 7f22f297acb9de8a9b1bc0d22d1e9a07cb6177e6 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 06 Sep 2008 12:01:20 -0400 Subject: [PATCH] One error message is enough if template was not found --- program/include/rcube_template.php | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index 3fdd817..9f94194 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -303,17 +303,13 @@ $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; } -- Gitblit v1.9.1