From 6a16bf5bb1cf2045c394c45e5bbceb261e16f59b Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 13 Feb 2005 10:21:11 +0000 Subject: - in case of SQL error, stop execution (prevents from errors in synchronization) git-svn-id: http://piwigo.org/svn/trunk@735 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index 77be51606..0ac10f7a8 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -609,20 +609,13 @@ function get_thumbnail_src($path, $tn_ext = '') // my_error returns (or send to standard output) the message concerning the // error occured for the last mysql query. -function my_error($header, $echo = true) +function my_error($header) { $error = '
';
   $error.= $header;
   $error.= '[mysql error '.mysql_errno().'] ';
   $error.= mysql_error();
   $error.= '
'; - if ($echo) - { - echo $error; - } - else - { - return $error; - } + die ($error); } ?> -- cgit v1.2.3