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

From: Date: Thu, 23 Sep 2021 15:43:28 +0000
Subject: Bug->Doc #71206 [Asn]: oci_fetch_all() returns 0 on failure
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19210@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71206&edit=1 ID: 71206 Updated by: cmb@php.net 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

« previous php.doc.bugs (#19210) next »