aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-02-13 10:21:11 +0000
committerplegall <plg@piwigo.org>2005-02-13 10:21:11 +0000
commit6a16bf5bb1cf2045c394c45e5bbceb261e16f59b (patch)
treebb11eeb0be4421ececcb566cffcaa1a2783e3a2b /include/functions.inc.php
parentd6af5d96289d363177d034dca3ea9e55ea55139d (diff)
- 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
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php11
1 files 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 = '<pre>';
$error.= $header;
$error.= '[mysql error '.mysql_errno().'] ';
$error.= mysql_error();
$error.= '</pre>';
- if ($echo)
- {
- echo $error;
- }
- else
- {
- return $error;
- }
+ die ($error);
}
?>