From 056668c9aef0c28703777ba54e83020fdd80713d Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 28 Apr 2010 16:11:07 +0000 Subject: bug 860: display a more readable error when the _data directory is not writable git-svn-id: http://piwigo.org/svn/trunk@5985 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 11 ++++++++--- include/template.class.php | 12 ++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 0ab3aae42..e78f823e8 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -361,10 +361,15 @@ function page_not_found($msg, $alternate_url=null) * this method can be called at any time (does not use template/language/user etc...) * @param string msg a message to display */ -function fatal_error($msg) +function fatal_error($msg, $title=null, $show_trace=true) { + if (empty($title)) + { + $title = 'Piwigo encountered a non recoverable error'; + } + $btrace_msg = ''; - if (function_exists('debug_backtrace')) + if ($show_trace and function_exists('debug_backtrace')) { $bt = debug_backtrace(); for ($i=1; $i