Xls Reader Array Offset Null (#2338)
See issue #2315. It is nominally solved by PR #2312, but that PR is completely unsuitable for merging. This one-line change is a replacement for that PR. As with many problems of this type, it is not clear how how to create a spreadsheet with this sort of harmless corruption in the wild. An example was supplied with the issue, and I have tested manually against it. However, the file is huge and not suitable for a formal unit test. I do not understand BIFF well enough to try and craft a suitable example on my own. Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
This commit is contained in:
parent
f59b4dc363
commit
ca5bd9b1d3
|
|
@ -7017,7 +7017,7 @@ class Xls extends BaseReader
|
|||
// offset: 3; size: 2; one-based index to DEFINEDNAME or EXTERNNAME record
|
||||
$index = self::getUInt2d($formulaData, 3);
|
||||
// assume index is to EXTERNNAME record
|
||||
$data = $this->externalNames[$index - 1]['name'];
|
||||
$data = $this->externalNames[$index - 1]['name'] ?? '';
|
||||
// offset: 5; size: 2; not used
|
||||
break;
|
||||
case 0x3A: // 3d reference to cell
|
||||
|
|
|
|||
Loading…
Reference in New Issue