While adding PHPUnit tests to my project using this package I got numerous errors. By checking if it is initialized before closing I could prevent the errors.
/**
* Disconnect from db server
* Called automatically from __destruct function
*/
public function disconnect()
{
if( self::$inst != null )
{
$this->link->close();
}
}
Bennett Stone - 2017-09-09 16:39:14 - In reply to message 1 from William Cairns
Good catch! I don't actually still support this particular class as I created a PDO version here: https://www.phpclasses.org/package/8933-PHP-Wrapper-to-access-MySQL-databases-using-PDO.html which is more secure.
The same methods are implemented within SimplePDO so converting between them is quite easy as well.