From d2daaf0317ac6bb224b8f93c1ac9578c9d570dc9 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 11 May 2011 19:38:04 -0400 Subject: [PATCH] [feature/template-engine] Try to handle failed template includes. PHPBB3-9726 --- phpBB/includes/template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 2ebbca3568..90b8bb2a22 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -508,7 +508,8 @@ class phpbb_template } else { - // What should we do here? + // trigger_error cannot be used here, as the output already started + echo 'template->_tpl_include(): Failed including ' . htmlspecialchars($handle) . "\n"; } } @@ -525,7 +526,7 @@ class phpbb_template if (!file_exists($file)) { // trigger_error cannot be used here, as the output already started - echo 'template->_php_include(): File ' . htmlspecialchars($file) . ' does not exist or is empty'; + echo 'template->_php_include(): File ' . htmlspecialchars($file) . " does not exist\n"; return; } include($file);