diff --git a/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php b/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php index dc19e6c..d1501b8 100755 --- a/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php +++ b/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php @@ -79,7 +79,7 @@ class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder return PHPExcel_Cell_DataType::TYPE_STRING; } elseif ($pValue instanceof PHPExcel_RichText) { return PHPExcel_Cell_DataType::TYPE_INLINE; - } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { + } elseif ($pValue[0] === '=' && strlen($pValue) > 1) { return PHPExcel_Cell_DataType::TYPE_FORMULA; } elseif (is_bool($pValue)) { return PHPExcel_Cell_DataType::TYPE_BOOL; @@ -87,7 +87,7 @@ class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder return PHPExcel_Cell_DataType::TYPE_NUMERIC; } elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) { $tValue = ltrim($pValue, '+-'); - if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.') { + if (is_string($pValue) && $tValue[0] === '0' && strlen($tValue) > 1 && $tValue[1] !== '.') { return PHPExcel_Cell_DataType::TYPE_STRING; } elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) { return PHPExcel_Cell_DataType::TYPE_STRING;