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
-Type: Bug
+Type: Documentation Problem
Package: OCI8 related
Operating System: Linux
PHP Version: 5.6.16
-Assigned To: sixd
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> 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. :)
Previous Comments:
------------------------------------------------------------------------
[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.