Skip to content

Commit 3ef6e37

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Check the return value of lo_export.
2 parents ab3a746 + 211f4ce commit 3ef6e37

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
. Fixed bug #66679 (Alignment Bug in PCRE 8.34 upstream).
6161
(Rainer Jung, Anatol Belski)
6262

63+
- pgsql:
64+
. Fixed bug #68697 (lo_export return -1 on failure). (Ondřej Surý)
65+
6366
- PDO_mysql:
6467
. Fixed bug #68424 (Add new PDO mysql connection attr to control multi
6568
statements option). (peter dot wolanin at acquia dot com)

ext/pgsql/pgsql.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3731,10 +3731,10 @@ PHP_FUNCTION(pg_lo_export)
37313731

37323732
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink);
37333733

3734-
if (lo_export(pgsql, oid, file_out)) {
3735-
RETURN_TRUE;
3734+
if (lo_export(pgsql, oid, file_out) == -1) {
3735+
RETURN_FALSE;
37363736
}
3737-
RETURN_FALSE;
3737+
RETURN_TRUE;
37383738
}
37393739
/* }}} */
37403740

0 commit comments

Comments
 (0)