From bb500e2c346e65a8f241f8c9316688ba509dedca Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Tue, 27 Sep 2022 15:52:44 +0200 Subject: [PATCH] Scrutinizer tweak --- src/PhpSpreadsheet/Calculation/Calculation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 4f95af54..5725795e 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -4866,7 +4866,7 @@ class Calculation } } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token ?? '', $matches)) { // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on - if ($pCellParent) { + if ($cell !== null && $pCellParent !== null) { $cell->attach($pCellParent); }