ZF-5050: "Call to a member function close() on a non-object" when using Zend_Db_Adapter_Mysqli::closeConnection()
Description
Some small bug I found in the closeConnection() method:
public function closeConnection()
{
$this->_connection->close();
$this->_connection = null;
}
you should do something like that:
public function closeConnection()
{
if (is_null($this->_connection))
return;
$this->_connection->close();
$this->_connection = null;
}
Otherwise the following error is occured if you do not do anything with the object, e.g.:
1.) $mysql = new Zend_Db_Adapter_Mysqli($config); 2.) $mysql->closeConnection();
Fatal error: Call to a member function close() on a non-object in ???\Zend\Db\Adapter\Mysqli.php on line 326
Comments
Posted by Mickael Perraud (mikaelkael) on 2008-12-01T12:58:12.000+0000
Resolved with SVN12978
Posted by Mickael Perraud (mikaelkael) on 2008-12-15T13:48:10.000+0000
Merged to 1.7-branch