|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68697 lo_export return -1 on failure
Submitted: 2014-12-30 15:31 UTC Modified: 2014-12-30 18:04 UTC
From: Assigned: ondrej (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 5.6Git-2014-12-30 (Git) OS:
Private report: No CVE-ID: None
 [2014-12-30 15:31 UTC]
libpq lo_export returns -1 on failure, but PHP code doesn't check for -1, but for "!= 0"

Also affects PHP-5.4 and PHP-5.5.

Test script:
As reported in Debian BTS:

Expected result:
returns FALSE on failure

Actual result:
return TRUE on failure


check-libpq-lo_export-return-value.patch (last revision 2014-12-30 16:23 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-30 16:23 UTC]
The following patch has been added/updated:

Patch Name: check-libpq-lo_export-return-value.patch
Revision:   1419956611
 [2014-12-30 18:04 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ondrej
 [2014-12-30 18:04 UTC]
Thanks Ondřej! Merged to 5.5, 5.6 and master.

I haven't merged this to 5.4, given that's in security fix only mode — this may be so tiny and obviously correct that Stas will allow it if you ask, but I'm not comfortable committing it unless he gives a +1.
 [2014-12-30 18:04 UTC]
-Package: *General Issues +Package: PostgreSQL related
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 02:03:44 2023 UTC