diff --git a/include/Excel/OLE.php b/include/Excel/OLE.php index bda705b88..dfd2d5259 100644 --- a/include/Excel/OLE.php +++ b/include/Excel/OLE.php @@ -306,7 +306,7 @@ class OLE extends PEAR { $rawname = ''; for ($i = 0; $i < strlen($ascii); $i++) { - $rawname .= $ascii{$i}."\x00"; + $rawname .= $ascii[$i]."\x00"; } return $rawname; } @@ -378,7 +378,7 @@ class OLE extends PEAR $high_part = 0; for ($i=0; $i<4; $i++) { - $al = unpack('C', $string{(7 - $i)}); + $al = unpack('C', $string[(7 - $i)]); $high_part += $al['']; if ($i < 3) { $high_part *= 0x100; @@ -387,7 +387,7 @@ class OLE extends PEAR $low_part = 0; for ($i=4; $i<8; $i++) { - $al = unpack('C', $string{(7 - $i)}); + $al = unpack('C', $string[(7 - $i)]); $low_part += $al['']; if ($i < 7) { $low_part *= 0x100; diff --git a/include/Excel/Parser.php b/include/Excel/Parser.php index 79a5eeb76..c1e9c2a42 100644 --- a/include/Excel/Parser.php +++ b/include/Excel/Parser.php @@ -1084,7 +1084,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR $col = 0; $col_ref_length = strlen($col_ref); for ($i = 0; $i < $col_ref_length; $i++) { - $col += (ord($col_ref{$i}) - ord('A') + 1) * pow(26, $expn); + $col += (ord($col_ref[$i]) - ord('A') + 1) * pow(26, $expn); $expn--; } @@ -1106,20 +1106,20 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR $formula_length = strlen($this->_formula); // eat up white spaces if ($i < $formula_length) { - while ($this->_formula{$i} == " ") { + while ($this->_formula[$i] == " ") { $i++; } if ($i < ($formula_length - 1)) { - $this->_lookahead = $this->_formula{$i+1}; + $this->_lookahead = $this->_formula[$i+1]; } $token = ''; } while ($i < $formula_length) { - $token .= $this->_formula{$i}; + $token .= $this->_formula[$i]; if ($i < ($formula_length - 1)) { - $this->_lookahead = $this->_formula{$i+1}; + $this->_lookahead = $this->_formula[$i+1]; } else { $this->_lookahead = ''; } @@ -1134,7 +1134,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR } if ($i < ($formula_length - 2)) { - $this->_lookahead = $this->_formula{$i+2}; + $this->_lookahead = $this->_formula[$i+2]; } else { // if we run out of characters _lookahead becomes empty $this->_lookahead = ''; } @@ -1282,7 +1282,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR { $this->_current_char = 0; $this->_formula = $formula; - $this->_lookahead = $formula{1}; + $this->_lookahead = $formula[1]; $this->_advance(); $this->_parse_tree = $this->_condition(); if (PEAR::isError($this->_parse_tree)) {