From 9331422a8adf9f584f62241107647855068fcb80 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Thu, 23 May 2013 22:34:08 +0100 Subject: [PATCH] SQLite caching - fix error message --- Classes/PHPExcel/CachedObjectStorage/SQLite.php | 1 - Examples/06largescale-with-cellcaching.php | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite.php b/Classes/PHPExcel/CachedObjectStorage/SQLite.php index 5a72f6f..1b0221e 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite.php @@ -284,7 +284,6 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C public function __destruct() { if (!is_null($this->_DBHandle)) { $this->_DBHandle->queryExec('DROP TABLE kvp_'.$this->_TableName); - sqlite_close($this->_DBHandle); } $this->_DBHandle = null; } // function __destruct() diff --git a/Examples/06largescale-with-cellcaching.php b/Examples/06largescale-with-cellcaching.php index e645d0b..ff6e7b2 100644 --- a/Examples/06largescale-with-cellcaching.php +++ b/Examples/06largescale-with-cellcaching.php @@ -38,7 +38,9 @@ date_default_timezone_set('Europe/London'); require_once '../Classes/PHPExcel.php'; $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip; -PHPExcel_Settings::setCacheStorageMethod($cacheMethod); +if (!PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) { + die($cacheMethod . " caching method is not available" . EOL); +} echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL;