1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-22 07:20:11 +02:00

[feature/template-engine] Try to handle failed template includes.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev 2011-05-11 19:38:04 -04:00
parent 7638bcb560
commit d2daaf0317

View File

@ -508,7 +508,8 @@ class phpbb_template
} }
else 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)) if (!file_exists($file))
{ {
// trigger_error cannot be used here, as the output already started // 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; return;
} }
include($file); include($file);