mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
PHP 8.1 compatibility
This commit is contained in:
@@ -39,7 +39,10 @@ class Subtotal
|
||||
if ($cellReference->getWorksheet()->cellExists($column . $row)) {
|
||||
//take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
|
||||
$isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
|
||||
$cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
|
||||
$cellFormula = !preg_match(
|
||||
'/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i',
|
||||
$cellReference->getWorksheet()->getCell($column . $row)->getValue() ?? ''
|
||||
);
|
||||
|
||||
$retVal = !$isFormula || $cellFormula;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user