From dd766cbb79e529fb0b8ae48ce3befb65e0cb9b39 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sun, 19 Feb 2012 02:07:13 +0100
Subject: [PATCH] Fix: Use current errno into log.

---
 htdocs/core/db/pgsql.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index e175e617735..f255346e41b 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -563,7 +563,7 @@ class DoliDBPgsql
     				$this->lasterror = $this->error();
     				$this->lasterrno = $this->errno();
 			    }
-				dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
+				dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." ".$this->errno(), LOG_WARNING);
 				//print "\n>> ".$query."<br>\n";
 				//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
 
-- 
GitLab