mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
modify cell cache getInstance() method to validate response from initialize() if it hasn't been called explicitly by a user call
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@83743 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -125,12 +125,14 @@ class PHPExcel_CachedObjectStorageFactory {
|
||||
|
||||
public static function getInstance(PHPExcel_Worksheet $parent) {
|
||||
if (is_null(self::$_cacheStorageMethod)) {
|
||||
self::initialize();
|
||||
$cacheMethodIsAvailable = self::initialize();
|
||||
}
|
||||
|
||||
$instance = new self::$_cacheStorageClass($parent,self::$_storageMethodParameters[self::$_cacheStorageMethod]);
|
||||
if (!is_null($instance)) {
|
||||
return $instance;
|
||||
if ($cacheMethodIsAvailable) {
|
||||
$instance = new self::$_cacheStorageClass($parent,self::$_storageMethodParameters[self::$_cacheStorageMethod]);
|
||||
if (!is_null($instance)) {
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user