#36096 [NEW]: OCI_Result() was broken data, after non checked OCI_Fetch() is executed
| From: | t_murata at neocortex dot co dot jp | Date: | Fri, 20 Jan 2006 07:31:16 +0000 |
| Subject: | #36096 [NEW]: OCI_Result() was broken data, after non checked OCI_Fetch() is executed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-92257@lists.php.net to get a copy of this message | ||
From: t_murata at neocortex dot co dot jp
Operating system: Linux
PHP version: 5.1.2
PHP Bug Type: OCI8 related
Bug description: OCI_Result() was broken data, after non checked OCI_Fetch() is executed
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 bug report at http://bugs.php.net/?id=36096&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36096&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36096&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36096&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36096&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36096&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36096&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36096&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36096&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36096&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36096&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36096&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36096&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36096&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36096&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36096&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36096&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36096&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36096&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36096&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36096&r=mysqlcfg