php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch check-libpq-lo_export-return-value.patch for PostgreSQL related Bug #68697

Patch version 2014-12-30 16:23 UTC

Return to Bug #68697 | Download this patch
Patch Revisions:

Developer: ondrej@php.net

--- php5.orig/ext/pgsql/pgsql.c
+++ php5/ext/pgsql/pgsql.c
@@ -3631,10 +3631,10 @@ PHP_FUNCTION(pg_lo_export)
 
 	ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
 
-	if (lo_export(pgsql, oid, file_out)) {
-		RETURN_TRUE;
+	if (lo_export(pgsql, oid, file_out) == -1) {
+		RETURN_FALSE;
 	}
-	RETURN_FALSE;
+	RETURN_TRUE;
 }
 /* }}} */
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC