ZF-12310: Zend_Db_Adapter_Exception::hasChainedException tries to read a private property from Zend_Exception
Description
Basically the problem is:
class Zend_Exception extends Exception
{
private $_previous = null;
}
class Zend_Db_Adapter_Exception extends Zend_Db_Exception
{
public function hasChainedException()
{
return ($this->_previous !== null);
}
}
I can imagine that either:
1) {{Zend_Db_Adapter_Exception::hasChainedException}} should call {{Zend_Exception::getPrevious()}} instead of reading the missing private property 2) or {{Zend_Exception::$_previous}} should be declared protected 3) or {{Zend_Db_Adapter_Exception::hasChainedException()}} should be moved to {{Zend_Exception}}
I checked and this does not seem to be fixed in 1.11.12
Comments
Posted by Ivo Kund (ivokund) on 2012-06-29T14:52:56.000+0000
The aforementioned patch would be: