2
0
forked from Wavyzz/dolibarr

Fix: Save error only if it's not error to say there is error.

This commit is contained in:
Laurent Destailleur
2012-02-09 21:19:03 +01:00
parent 29d90f3713
commit 1e4efb9e16

View File

@@ -556,9 +556,12 @@ class DoliDBPgsql
{
if (! $ret)
{
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
if ($this->errno() != 'DB_ERROR_25P02')
{
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
}
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
//print "\n>> ".$query."<br>\n";
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";