From c1f5bdba5db90cb8ef4ad688c3d1d8dfad220f80 Mon Sep 17 00:00:00 2001 From: josch1710 Date: Tue, 23 Aug 2016 17:31:28 +0200 Subject: [PATCH] removeColumn doesn't remove all cells removeColumn doesn't remove all cells, because CacheBase::deleteCacheData only unsets cell data if they are objects. But cached cell data could be arrays. I moved the unset from inside the if block (line 150 ff) to after the if block. --- src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php b/src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php index 1dfad8a9..c5bc2291 100644 --- a/src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php +++ b/src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php @@ -147,8 +147,8 @@ abstract class CacheBase if (is_object($this->cellCache[$pCoord])) { $this->cellCache[$pCoord]->detach(); - unset($this->cellCache[$pCoord]); } + unset($this->cellCache[$pCoord]); $this->currentCellIsDirty = false; }