php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71206 oci_fetch_all() returns 0 on failure
Submitted: 2015-12-23 16:48 UTC Modified: 2021-09-23 15:43 UTC
From: Oleg dot Stepanischev at tatar dot ru Assigned: cmb (profile)
Status: Closed Package: OCI8 related
PHP Version: 5.6.16 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Oleg dot Stepanischev at tatar dot ru
New email:
PHP Version: OS:

 

 [2015-12-23 16:48 UTC] 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)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-24 02:46 UTC] laruence@php.net
-Assigned To: +Assigned To: sixed
 [2016-01-08 02:31 UTC] sixd@php.net
-Assigned To: sixed +Assigned To: sixd
 [2021-09-23 15:43 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Assigned To: sixd +Assigned To: cmb
 [2021-09-23 15:43 UTC] cmb@php.net
> 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. :)
 [2021-09-23 15:48 UTC] git@php.net
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
 [2021-09-23 15:48 UTC] git@php.net
-Status: Assigned +Status: Closed
 [2021-09-23 20:09 UTC] git@php.net
Automatic comment on behalf of mumumu
Revision: https://github.com/php/doc-ja/commit/8a670fa566e6c4374da175c6373bb4b90dbfb170
Log: Fix #71206: oci_fetch_all() returns 0 on failure
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 10:01:28 2025 UTC