Update CacheBase.php to prevent fatal error

When deleteCacheData() is called it will throw a fatal error if the _currentObject is null.
This commit is contained in:
Jared Hall 2015-04-09 14:46:42 -06:00
parent eedcc49f81
commit 2736af7994
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ abstract class PHPExcel_CachedObjectStorage_CacheBase {
* @throws PHPExcel_Exception
*/
public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) {
if ($pCoord === $this->_currentObjectID && !is_null($this->_currentObject)) {
$this->_currentObject->detach();
$this->_currentObjectID = $this->_currentObject = null;
}