This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Fata error when formula references non-existent worksheet #45
Open
Description
Fatal error: Call to a member function cellExists() on a non-object in Calculation.php on line 3243
culprit line is: if ($pCellParent->getParent()->getSheetByName($matches[2])->cellExists($cellRef)) {
The sheet is expected to exist, which is not always the case for example when only loading certain named sheets using setLoadSheetsOnly()
Fix looks as simple as changing line to:
$cellSheet = $pCellParent->getParent()->getSheetByName($matches[2]);
if ($cellSheet && $cellSheet->cellExists($cellRef)) {
Not sure if preferable to throw an error (can errors be ignored?) or not instead of letting it fall through the null assignment.