cvs: php4 /ext/pgsql pgsql.c
| From: | Jani Taskinen | Date: | Fri, 29 Jun 2001 03:12:10 +0000 |
| Subject: | cvs: php4 /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6045@lists.php.net to get a copy of this message | ||
sniper Thu Jun 28 23:12:10 2001 EDT
Modified files:
/php4/ext/pgsql pgsql.c
Log:
Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect()
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.112 php4/ext/pgsql/pgsql.c:1.113
--- php4/ext/pgsql/pgsql.c:1.112 Tue Jun 19 14:10:08 2001
+++ php4/ext/pgsql/pgsql.c Thu Jun 28 23:12:06 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.112 2001/06/19 18:10:08 jon Exp $ */
+/* $Id: pgsql.c,v 1.113 2001/06/29 03:12:06 sniper Exp $ */
#include <stdlib.h>
@@ -434,10 +434,10 @@
pgsql=PQsetdb(host,port,options,tty,dbname);
}
if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
+ php_error(E_WARNING,"Unable to connect to PostgreSQL server:
%s",PQerrorMessage(pgsql));
if (pgsql) {
PQfinish(pgsql);
}
- php_error(E_WARNING,"Unable to connect to PostgreSQL server:
%s",PQerrorMessage(pgsql));
efree(hashed_details);
RETURN_FALSE;
}