On the chance that a cell doesn't have a defined style but it's still trying to be formatted

This commit is contained in:
Mark Baker 2013-11-16 10:38:30 +00:00
parent 968bfef0a2
commit fe84015077
1 changed files with 1 additions and 1 deletions

View File

@ -2426,7 +2426,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
$style = $this->_parent->getCellXfByIndex($cell->getXfIndex());
$returnValue[$rRef][$cRef] = PHPExcel_Style_NumberFormat::toFormattedString(
$returnValue[$rRef][$cRef],
($style->getNumberFormat()) ?
($style && $style->getNumberFormat()) ?
$style->getNumberFormat()->getFormatCode() :
PHPExcel_Style_NumberFormat::FORMAT_GENERAL
);