Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Bug #23784 The getRow method with placeholder causes PHP warning and doesn't return data
Submitted: 2018-12-21 09:38 UTC
From: blueblood Assigned:
Status: Open Package: DB (version 1.9.3)
PHP Version: 5.6.39 OS: CentOS Linux release 7.3.1611
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 + 1 = ?

 
 [2018-12-21 09:38 UTC] blueblood (Wataru Yamada)
Description: ------------ Dear, The getRow method with placeholder occurs PHP warning and does not return correct result. As far as checked, the value of "result" and "statement" property in DB_result object is updated from "(oci8 statement)" to "(Unknown)" after $this->freePrepared in common.php on line 1350 to be executed. Please check it. Thank you and best regards, Test script: --------------- <?php $dsn = 'please set'; $conn = DB::connect($dsn); if (DB::isError($conn)) { echo "connection failed" . PHP_EOL; exit; } $sql = 'SELECT id FROM xxx_tbl WHERE user_hash = ?'; $params = ['1234567890']; $row = $conn->getRow($sql, $params); var_dump($row); $conn->disconnect(); exit; Expected result: ---------------- the first row's data in an array Actual result: -------------- I got the following PHP warning PHP Warning: ocifetchinto(): 20 is not a valid oci8 statement resource in /home/blueblood/vendor/pear-pear.php.net/DB/DB/oci8.php on line 397

Comments

 [2018-12-21 09:52 UTC] blueblood (Wataru Yamada)
-Operating System: Operation system: CentOS Linux r +Operating System: CentOS Linux release 7.3.1611
 [2018-12-21 12:43 UTC] blueblood (Wataru Yamada)
-Summary: The getRow method with placeholder occurs PHP warning and does not return corre +Summary: The getRow method with placeholder causes PHP warning and doesn't return data