trying to property of non-object is repaired

$tNode can be null, if the cell is empty.
This commit is contained in:
Aleksandra 2018-08-30 19:08:20 +03:00 committed by GitHub
parent 799ad93d23
commit f7ad198d7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,11 @@ class CellValueFormatter
// inline strings are formatted this way:
// <c r="A1" t="inlineStr"><is><t>[INLINE_STRING]</t></is></c>
$tNode = $node->getElementsByTagName(self::XML_NODE_INLINE_STRING_VALUE)->item(0);
if ($tNode === null) {
return null;
}
$cellValue = $this->escaper->unescape($tNode->nodeValue);
return $cellValue;
}