Doc #71206 [Asn->Csd]: oci_fetch_all() returns 0 on failure

[email protected]
Newsgroups php.doc.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=71206&edit=1

 ID:                 71206
 Updated by:         [email protected]
 Reported by:        Oleg dot Stepanischev at tatar dot ru
 Summary:            oci_fetch_all() returns 0 on failure
-Status:             Assigned
+Status:             Closed
 Type:               Documentation Problem
 Package:            OCI8 related
 Operating System:   Linux
 PHP Version:        5.6.16
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmb69
Revision: https://github.com/php/doc-en/commit/d33a6756e7a94bc06164d2a97bb0a3ffa19e3471
Log: Fix #71206: oci_fetch_all() returns 0 on failure


Previous Comments:
------------------------------------------------------------------------
[2021-09-23 15:43:28] [email protected]

> Presumably you want to either correct the documented behavior of
> oci_fetch_all(), or perhaps remove "failure behavior" from the its
> doc completely.

The latter. :)

------------------------------------------------------------------------
[2015-12-23 16:48:56] Oleg dot Stepanischev at tatar dot ru

Description:
------------
The documented behavior of oci_fetch_all() says it will return FALSE on failure.  However, it appears to return 0 instead.

Presumably you want to either correct the documented behavior of oci_fetch_all(), or perhaps remove "failure behavior" from the its doc completely.

Test script:
---------------
$stmt = oci_parse($conn, $sql);
oci_execute($stmt);
$rows = oci_fetch_all($stmt, $ret, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
var_dump($rows);


Expected result:
----------------
Warning: oci_fetch_all(): in ... on line ...

bool(false)

Actual result:
--------------
Warning: oci_fetch_all(): in ... on line ...

int(0)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71206&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.