From: foobar Date: Thu, 20 Feb 2003 07:10:07 +0000 (+0000) Subject: Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false) X-Git-Tag: RELEASE_0_5~850 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f593f899f6b6839163a88f2a83edc273678d585;p=php Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false) --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 8813bc60bc..5295228185 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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;