Issues

ZF-10829: Zend_Db_Adapter_Oracle::isConnected() is not working with persistent connections.

Issue Type: Bug Created: 2010-12-15T08:32:26.000+0000 Last Updated: 2010-12-19T02:52:45.000+0000 Status: Resolved Fix version(s): - 1.11.2 (30/Dec/10)

Reporter: Fran├žois-Xavier MAURICARD (fxmauricard) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db_Adapter_Oracle

Related issues: Attachments:

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts