]> granicus.if.org Git - php/commitdiff
Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false)
authorfoobar <sniper@php.net>
Thu, 20 Feb 2003 07:10:07 +0000 (07:10 +0000)
committerfoobar <sniper@php.net>
Thu, 20 Feb 2003 07:10:07 +0000 (07:10 +0000)
ext/pgsql/pgsql.c

index 8813bc60bc5b8885b7ad18fa4fcab7dcb27091ee..529522818546a1df12e53b7d82f8b25f0e4b8b9a 100644 (file)
@@ -2204,7 +2204,7 @@ PHP_FUNCTION(pg_lo_seek)
 
        ZEND_FETCH_RESOURCE(pgsql, pgLofp *, &pgsql_id, -1, "PostgreSQL large object", le_lofp);
 
-       if (lo_lseek((PGconn *)pgsql->conn, pgsql->lofd, offset, whence )) {
+       if (lo_lseek((PGconn *)pgsql->conn, pgsql->lofd, offset, whence ) > -1) {
                RETURN_TRUE;
        } else {
                RETURN_FALSE;