Skip to content
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
@seliquity

Description

@seliquity

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions