diff options
author | Thies C. Arntzen <thies@php.net> | 2000-10-07 09:10:54 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 2000-10-07 09:10:54 +0000 |
commit | 6b5441c30fb93353496e4a2723b063cebe372db8 (patch) | |
tree | 3f12e1f1f550840f616cc8e2ac6a5f9f63e57e13 | |
parent | b88fc00775872355aa4c5c11f12aab7a23e5f852 (diff) | |
download | php-git-6b5441c30fb93353496e4a2723b063cebe372db8.tar.gz |
@- Fixed returning of empty LOB fields in OCI8. (Thies)
-rw-r--r-- | ext/oci8/oci8.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 2d0142f2eb..0e34f4caa7 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1555,7 +1555,7 @@ static int oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer,ub4 *loblen) { ub4 siz = 0; - ub4 readlen; + ub4 readlen = 0; char *buf; *loblen = 0; @@ -1572,7 +1572,6 @@ oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer,u } } - connection->error = OCILobGetLength(connection->pServiceContext, connection->pError, @@ -1586,7 +1585,7 @@ oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer,u buf = emalloc(readlen + 1); - do { + while (readlen > 0) { /* thies loop should not be entered on readlen == 0 */ connection->error = OCILobRead(connection->pServiceContext, connection->pError, @@ -1609,7 +1608,7 @@ oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer,u } else { break; } - } while (1); + } if (connection->error) { oci_error(connection->pError, "OCILobRead", connection->error); |