ZF-7887: Unreachable code


This is actually for Zend_Db_Statement_Oracle, but that doesn't show up in the list of Components.

I'm looking at version 1.9.2 (Minimal). In Zend/Db/Statement/Oracle.php in the _execute() function there is some unreachable code. The same conditional is checked twice, and there's a return false after the first one, so the throwing of the exception is unreachable in the seconde. The coding style is also different for the two conditionals, one with and one without a space between the ! and the $this->_stmt.

$connection = $this->_adapter->getConnection();
if (!$this->_stmt) {
    return false;

if (! $this->_stmt) {
     * @see Zend_Db_Adapter_Oracle_Exception
    require_once 'Zend/Db/Statement/Oracle/Exception.php';
    throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection));


Based on Mysqli, PDO and Db2 files: the 2nd part (exception) should be erased.

Resolved in trunk in r18635 and in branch release 1.9 in r18636