We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0371ccb commit f4885d9Copy full SHA for f4885d9
src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php
@@ -39,7 +39,10 @@ function ($index) use ($cellReference) {
39
if ($cellReference->getWorksheet()->cellExists($column . $row)) {
40
//take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
41
$isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
42
- $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
+ $cellFormula = !preg_match(
43
+ '/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i',
44
+ $cellReference->getWorksheet()->getCell($column . $row)->getValue() ?? ''
45
+ );
46
47
$retVal = !$isFormula || $cellFormula;
48
}
0 commit comments