diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index 9c76e6c0..796217be 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -649,16 +649,16 @@ class PHPExcel_Cell // We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString // for improved performance - if (isset($pString[0])) { - if (!isset($pString[1])) { + if (isset($pString{0})) { + if (!isset($pString{1})) { return $_columnLookup[$pString]; - } elseif(!isset($pString[2])) { - return $_columnLookup[$pString[0]] * 26 + $_columnLookup[$pString[1]]; - } elseif(!isset($pString[3])) { - return $_columnLookup[$pString[0]] * 676 + $_columnLookup[$pString[1]] * 26 + $_columnLookup[$pString[2]]; + } elseif(!isset($pString{2})) { + return $_columnLookup[$pString{0}] * 26 + $_columnLookup[$pString{1}]; + } elseif(!isset($pString{3})) { + return $_columnLookup[$pString{0}] * 676 + $_columnLookup[$pString{1}] * 26 + $_columnLookup[$pString{2}]; } } - throw new Exception("Column string index can not be " . ((isset($pString[0])) ? "longer than 3 characters" : "empty") . "."); + throw new Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty") . "."); } /**