fix php 8.1 error when autoFilter['ref'] is null

This commit is contained in:
Roland Eigelsreiter 2022-02-16 10:18:13 +01:00 committed by Adrien Crivelli
parent ef839f56be
commit 1a4e4ed7c5
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class AutoFilter
public function load(): void
{
// Remove all "$" in the auto filter range
$autoFilterRange = preg_replace('/\$/', '', $this->worksheetXml->autoFilter['ref']);
$autoFilterRange = preg_replace('/\$/', '', $this->worksheetXml->autoFilter['ref'] ?? '');
if (strpos($autoFilterRange, ':') !== false) {
$this->readAutoFilter($autoFilterRange, $this->worksheetXml);
}