Skip to content

Commit c8089f9

Browse files
committed
Prevent notice when no rules
Closes PHPOffice/PHPExcel#1287
1 parent cf2c0e5 commit c8089f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Worksheet/AutoFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ public function showHideRows()
629629
$rules = $filterColumn->getRules();
630630
switch ($filterColumn->getFilterType()) {
631631
case AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER:
632+
$ruleType = null;
632633
$ruleValues = [];
633634
// Build a list of the filter value selections
634635
foreach ($rules as $rule) {
@@ -700,7 +701,6 @@ public function showHideRows()
700701
$ruleValues = [];
701702
// Build a list of the filter value selections
702703
foreach ($rules as $rule) {
703-
$ruleType = $rule->getRuleType();
704704
$ruleValue = $rule->getValue();
705705
if (!is_numeric($ruleValue)) {
706706
// Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards

0 commit comments

Comments
 (0)