php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71206 oci_fetch_all() returns 0 on failure
Submitted: 2015-12-23 16:48 UTC Modified: 2016-01-08 02:31 UTC
From: Oleg dot Stepanischev at tatar dot ru Assigned: sixd (profile)
Status: Assigned Package: OCI8 related
PHP Version: 5.6.16 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 12:01:26 2019 UTC