From 66b9ffa8ac5aa75cc1e39c3e45061e3fb82d74f0 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Wed, 3 Sep 2014 22:43:59 +0100 Subject: [PATCH] Minor tweaks to cell constructor --- Classes/PHPExcel/Cell.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 7f0dd1a..521b7bf 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -88,7 +88,7 @@ class PHPExcel_Cell * * @var int */ - private $_xfIndex; + private $_xfIndex = 0; /** * Attributes of the formula @@ -113,8 +113,6 @@ class PHPExcel_Cell } public function attach(PHPExcel_CachedObjectStorage_CacheBase $parent) { - - $this->_parent = $parent; } @@ -140,14 +138,9 @@ class PHPExcel_Cell if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) $pDataType = PHPExcel_Cell_DataType::TYPE_STRING; $this->_dataType = $pDataType; - } else { - if (!self::getValueBinder()->bindValue($this, $pValue)) { - throw new PHPExcel_Exception("Value could not be bound to cell."); - } + } elseif (!self::getValueBinder()->bindValue($this, $pValue)) { + throw new PHPExcel_Exception("Value could not be bound to cell."); } - - // set default index to cellXf - $this->_xfIndex = 0; } /**