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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC