allow numeric 0

This commit is contained in:
Grzegorz Daszuta 2015-04-02 12:54:56 +02:00
parent 8f51d4ac31
commit b7831cc933

View File

@ -135,9 +135,6 @@ EOD;
$data .= ' <c r="' . $columnIndex . $rowIndex . '"';
switch(true) {
case empty($cellValue):
$data .= '/>' . PHP_EOL;
break;
case gettype($cellValue) === 'integer':
case gettype($cellValue) === 'boolean':
case gettype($cellValue) === 'float':
@ -154,6 +151,9 @@ EOD;
$data .= ' t="s"><v>' . $sharedStringId . '</v></c>' . PHP_EOL;
}
break;
case empty($cellValue):
$data .= '/>' . PHP_EOL;
break;
default:
throw new InvalidDataException("Invalid data type " . gettype($cellValue));
}