Skip to content

Commit 02504f3

Browse files
authored
Merge pull request #20 from ebanx/quality/removeCurlyBracesForOffsetAccess
[t-C65jJpnq] Remove array and string offset access syntax with curly braces
2 parents da8a76e + 26d8a73 commit 02504f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xlsxwriter.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,9 @@ protected function writeCell(XLSXWriter_BuffererWriter &$file, $row_number, $col
428428
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="n"><v>'.self::convert_date_time($value).'</v></c>');
429429
} elseif (!is_string($value)) {
430430
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="n"><v>'.($value*1).'</v></c>');//int,float, etc
431-
} elseif ($value{0}!='0' && filter_var($value, FILTER_VALIDATE_INT)){ //excel wants to trim leading zeros
431+
} elseif ($value[0]!='0' && filter_var($value, FILTER_VALIDATE_INT)){ //excel wants to trim leading zeros
432432
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="n"><v>'.($value).'</v></c>');//numeric string
433-
} elseif ($value{0}=='='){
433+
} elseif ($value[0]=='='){
434434
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="s"><f>'.self::xmlspecialchars($value).'</f></c>');
435435
} elseif ($value!==''){
436436
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="s"><v>'.self::xmlspecialchars($this->setSharedString($value)).'</v></c>');

0 commit comments

Comments
 (0)