Bugfix: Add DROP TABLE in destructor for SQLite and SQLite3 cache controllers

This commit is contained in:
Mark Baker
2013-03-06 17:19:22 +00:00
parent 65f6ebf049
commit 8a97503f17
5 changed files with 258 additions and 0 deletions
@@ -282,6 +282,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C
* Destroy this cell collection
*/
public function __destruct() {
if (!is_null($this->_DBHandle)) {
$this->_DBHandle->queryExec('DROP TABLE kvp_'.$this->_TableName);
$this->_DBHandle->close();
}
$this->_DBHandle = null;
} // function __destruct()
@@ -291,6 +291,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_
*/
public function __destruct() {
if (!is_null($this->_DBHandle)) {
$this->_DBHandle->exec('DROP TABLE kvp_'.$this->_TableName);
$this->_DBHandle->close();
}
$this->_DBHandle = null;