Skip to content

Commit 2d561e0

Browse files
committed
Merge branch 'PHP-5.6'
* PHP-5.6: Check the return value of lo_export.
2 parents 68d2127 + 3ef6e37 commit 2d561e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/pgsql/pgsql.c

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

37293729
ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", le_link, le_plink);
37303730

3731-
if (lo_export(pgsql, oid, file_out)) {
3732-
RETURN_TRUE;
3731+
if (lo_export(pgsql, oid, file_out) == -1) {
3732+
RETURN_FALSE;
37333733
}
3734-
RETURN_FALSE;
3734+
RETURN_TRUE;
37353735
}
37363736
/* }}} */
37373737

0 commit comments

Comments
 (0)