From c64da384ea354a194cfdcbd552340261b5d547d9 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 20 Apr 2006 19:31:12 +0000 Subject: partial merge -r1173:1174 from branch-1_6 to trunk: new configuration parameter die_on_sql_error (upgrade.php and install/upgrade_*.php not concerned on BSF) partial merge -r1208:1209 from branch-1_6 to trunk (only bug fix on incorrect insertion of complex upgrade identifiers) deletions: upgrade.php and all install/upgrade_*.php because these script are never up to date on BSF. Anyway, they are only required on a stable branch. git-svn-id: http://piwigo.org/svn/trunk@1221 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/functions.inc.php') diff --git a/include/functions.inc.php b/include/functions.inc.php index 5e5b1ab9c..35b1e7935 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -651,12 +651,22 @@ function get_thumbnail_src($path, $tn_ext = '', $with_rewrite = true) // error occured for the last mysql query. function my_error($header) { + global $conf; + $error = '
';
   $error.= $header;
   $error.= '[mysql error '.mysql_errno().'] ';
   $error.= mysql_error();
   $error.= '
'; - die ($error); + + if ($conf['die_on_sql_error']) + { + die($error); + } + else + { + echo $error; + } } /** -- cgit v1.2.3