worksheet: fix if cellValue does not exist (#1727)

The condition is FALSE if the cell does not exist in the flipped table,
but anyway, it is sent in to a method requiring 'string' type, causing
it to fail.
This commit is contained in:
Jan Sverre Riksfjord 2020-12-10 22:52:00 +01:00 committed by GitHub
parent 1de03c2578
commit 916b6888eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1079,7 +1079,7 @@ class Worksheet extends WriterPart
{
$objWriter->writeAttribute('t', $mappedType);
if (!$cellValue instanceof RichText) {
self::writeElementIf($objWriter, isset($pFlippedStringTable[$cellValue]), 'v', $pFlippedStringTable[$cellValue]);
self::writeElementIf($objWriter, isset($pFlippedStringTable[$cellValue]), 'v', $pFlippedStringTable[$cellValue] ?? '');
} else {
$objWriter->writeElement('v', $pFlippedStringTable[$cellValue->getHashCode()]);
}