[Fusionforge-commits] r12855 - branches/Branch_5_1/src/common/include

Alain Peyrat aljeux at fusionforge.org
Sat Mar 19 17:49:18 CET 2011


Author: aljeux
Date: 2011-03-19 17:49:18 +0100 (Sat, 19 Mar 2011)
New Revision: 12855

Modified:
   branches/Branch_5_1/src/common/include/database-pgsql.php
Log:
Fix to get correct error message from database.

Modified: branches/Branch_5_1/src/common/include/database-pgsql.php
===================================================================
--- branches/Branch_5_1/src/common/include/database-pgsql.php	2011-03-19 15:35:30 UTC (rev 12854)
+++ branches/Branch_5_1/src/common/include/database-pgsql.php	2011-03-19 16:49:18 UTC (rev 12855)
@@ -242,7 +242,7 @@
 	$res = @pg_query_params($dbserver,$qstring,$params);
 	if (!$res) {
 		error_log('SQL: '. preg_replace('/\n\t+/', ' ',$qstring));
-		error_log('SQL> '.db_error());
+		error_log('SQL> '.db_error($dbserver));
 	}
 	return $res;
 }
@@ -487,7 +487,7 @@
  *	@return text error message.
  */
 function db_error($dbserver=NULL) {
-	return @pg_errormessage($dbserver);
+	return pg_last_error($dbserver);
 }
 
 /**




More information about the Fusionforge-commits mailing list