mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +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
|
// my_error returns (or send to standard output) the message concerning the
|
||||||
// error occured for the last mysql query.
|
// error occured for the last mysql query.
|
||||||
function my_error($header, $echo = true)
|
function my_error($header)
|
||||||
{
|
{
|
||||||
$error = '<pre>';
|
$error = '<pre>';
|
||||||
$error.= $header;
|
$error.= $header;
|
||||||
$error.= '[mysql error '.mysql_errno().'] ';
|
$error.= '[mysql error '.mysql_errno().'] ';
|
||||||
$error.= mysql_error();
|
$error.= mysql_error();
|
||||||
$error.= '</pre>';
|
$error.= '</pre>';
|
||||||
if ($echo)
|
die ($error);
|
||||||
{
|
|
||||||
echo $error;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return $error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user