Bug #73080 [NEW]: oci_execute doesn't work properly

From: Date: Wed, 14 Sep 2016 04:21:32 +0000
Subject: Bug #73080 [NEW]: oci_execute doesn't work properly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204023@lists.php.net to get a copy of this message
From: sergei dot solomonov at gmail dot com Operating system: Ubuntu 15.04 PHP version: 7.1.0RC1 Package: OCI8 related Bug Type: Bug Bug description:oci_execute doesn't work properly Description: ------------ Tested with 7.09 and 7.1.0RC1 on Ubuntu 15.04 and MacOSX10.11 operating systems. Looks like all 7.* versions affected. Works fine with php v5.5, v5.6. Default php.ini-development config was used. Configure command: './configure' '--enable-zip' '--enable-intl' '--with-oci8' '--enable-dbase' '--disable-cgi' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-opcache' '--enable-sigchild' '--enable-mbstring' '--with-xsl' '--with-gd' '--with-config-file-scan-dir=/usr/local/apache/conf' '--with-openssl' '--with-curl' '--with-zlib' '--enable-timezonedb' Test script: --------------- <?php class Statement { private $stmt; function __construct($query) { $conn = oci_connect('autotest', '6de9439834c914756974', 'cascade.erkc.ru', 'UTF8'); $this->stmt = oci_parse($conn, $query); } public function execute(array $bindParams = []) { $this->bindParams($bindParams); return oci_execute($this->stmt); // Line 14 } public function bindParams(array $bindParams = []) { foreach ($bindParams as $bvName => &$bvValue) oci_bind_by_name($this->stmt, $bvName, $bvValue); } public function fetch() { return oci_fetch_array($this->stmt, OCI_ASSOC); } } $stmt = new Statement("SELECT * FROM dual WHERE :p1 = 'xxx'"); $params = ['p1' => 'xxx']; $stmt->bindParams($params); $stmt->execute(); var_dump($stmt->fetch()); Expected result: ---------------- array(1) { ["DUMMY"]=> string(1) "X" } Actual result: -------------- PHP Notice: Array to string conversion in /usr/local/apache/htdocs/module/Db/1.php on line 14 bool(false) -- Edit bug report at https://bugs.php.net/bug.php?id=73080&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73080&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73080&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73080&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73080&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73080&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73080&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73080&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73080&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73080&r=support Expected behavior: https://bugs.php.net/fix.php?id=73080&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73080&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73080&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73080&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73080&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73080&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73080&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73080&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73080&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73080&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73080&r=mysqlcfg

« previous php.bugs (#204023) next »