#36096 [Asn->Csd]: OCI_Result() was broken data, after non checked OCI_Fetch() is executed
| From: | tony2001@php.net | Date: | Fri, 20 Jan 2006 11:02:54 +0000 |
| Subject: | #36096 [Asn->Csd]: OCI_Result() was broken data, after non checked OCI_Fetch() is executed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92273@lists.php.net to get a copy of this message | ||
ID: 36096
Updated by: tony2001@php.net
Reported By: t_murata at neocortex dot co dot jp
-Status: Assigned
+Status: Closed
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5.1.2
Assigned To: tony2001
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-01-20 09:23:45] sniper@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2006-01-20 08:31:14] t_murata at neocortex dot co dot jp
Description:
------------
Sorry. I am not a good English-speaking.
OCI_Result() was broken data, after non checked OCI_Fetch() is
executed.
Previous version (PHP 5.1.1) doesn't produce this broken data.
Reproduce code:
---------------
<?php
$con = OCI_Connect('usr', 'pwd', 'orasid');
$out = '';
if($con != false){
// SQL Code
$sql = 'SELECT \'ABC\' FROM DUAL WHERE 1<>1';
$stmt = OCI_Parse($con, $sql);
if(OCI_Execute($stmt, OCI_COMMIT_ON_SUCCESS)){
OCI_Fetch($stmt);
$out = OCI_Result($stmt, 1);
OCI_Free_Statement($stmt);
}
OCI_Close($con);
}
var_dump($out);
?>
Expected result:
----------------
NULL
Actual result:
--------------
string(3) "CT "
...etc.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36096&edit=1