php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42745 oci_execute returns wrong value when the first parameter is null
Submitted: 2007-09-24 09:36 UTC Modified: 2007-10-02 10:24 UTC
From: pcdinh at gmail dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.2.4 OS: CentOS 5
Private report: No CVE-ID: None
 [2007-09-24 09:36 UTC] pcdinh at gmail dot com
Description:
------------
OCI8 docs said: oci_execute returns TRUE on success or FALSE on failure. But when the first parameter is null, null is returned as well. That return value does not reflect the state of the execution: true or false. 

Reproduce code:
---------------
oci_execute(null)

Expected result:
----------------
oci_execute(null) should return false because null statement is abnormal. Developer should know that executing query on a null statement when developing a finance application with Oracle and PHp is dangerous.

Actual result:
--------------
oci_execute(null) return null wrongly

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-02 10:24 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Most of the functions in PHP return NULL if incorrect parameters or incorrect number of parameters were passed.
I won't change this one place and leave other places unchanged, in the same time changing it all over the code makes no sense to me, we got other things to do.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC