ZF-10829: Zend_Db_Adapter_Oracle::isConnected() is not working with persistent connections.
Description
If we are using persistent connection with Oracle, isConnected() always return false.
It's because it validates ressource type, but is not taking in count that it's note the same ressource type when we are in persistant connection.
Comments
Posted by François-Xavier MAURICARD (fxmauricard) on 2010-12-15T08:36:36.000+0000
Current code : {quote} /** * Test if a connection is active * * @return boolean */ public function isConnected() { return ((bool) (is_resource($this->_connection) && get_resource_type($this->_connection) == 'oci8 connection')); } {quote}
Fixed code : {quote} /** * Test if a connection is active * * @return boolean */ public function isConnected() { return ((bool) (is_resource($this->_connection) && ((get_resource_type($this->_connection) == 'oci8 connection') || (get_resource_type($this->_connection) == 'oci8 persistent connection')))); } {quote}
Posted by Ramon Henrique Ornelas (ramon) on 2010-12-18T11:06:04.000+0000
Assigned to Ralph
Posted by Mickael Perraud (mikaelkael) on 2010-12-19T02:52:44.000+0000
Fixed in trunk with r23557 and in 1.11 branch with r23558