mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-03 12:02:51 +02:00
- 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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user