ZF-11113: Zend_Db_Statement_Oracle::_prepare() throws PHP-Warnings


After connecting to an Oracle-DB PHP looses the connection because of an error on the DB-Server. The crash of oracle is not the problem, but the behaviour of our php-application: the Function Zend_Db_Statement_Oracle::_prepare() failed with an PHP-Warning ('oci_parse(): ORA-03114: not connected to ORACLE'). The coded exception was not thrown.

    protected function _prepare($sql)
        $connection = $this->_adapter->getConnection();
        $this->_stmt = oci_parse($connection, $sql);
        if (!$this->_stmt) {
             * @see Zend_Db_Statement_Oracle_Exception
            require_once 'Zend/Db/Statement/Oracle/Exception.php';
            throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection));

I think the "oci_parse($connection, $sql);" needed a leading "@", so the exception can be thrown. Functions like "_bindParam" are realised with a "@".


Fixed in trunk r23917

Hello, Adam. I will push [solve] button as proxy for You. If You want to release at next mini, You can merge this commit fron trunk to 1.11 branch.


Not merged yet, will do shortly.

Hi, Ralph . I merged this from trunk to 1.11 branch at r23959.