Prevent notice when no rules
Closes https://github.com/PHPOffice/PHPExcel/pull/1287
This commit is contained in:
parent
cf2c0e51f4
commit
c8089f97d8
|
@ -629,6 +629,7 @@ class AutoFilter
|
||||||
$rules = $filterColumn->getRules();
|
$rules = $filterColumn->getRules();
|
||||||
switch ($filterColumn->getFilterType()) {
|
switch ($filterColumn->getFilterType()) {
|
||||||
case AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER:
|
case AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER:
|
||||||
|
$ruleType = null;
|
||||||
$ruleValues = [];
|
$ruleValues = [];
|
||||||
// Build a list of the filter value selections
|
// Build a list of the filter value selections
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
|
@ -700,7 +701,6 @@ class AutoFilter
|
||||||
$ruleValues = [];
|
$ruleValues = [];
|
||||||
// Build a list of the filter value selections
|
// Build a list of the filter value selections
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
$ruleType = $rule->getRuleType();
|
|
||||||
$ruleValue = $rule->getValue();
|
$ruleValue = $rule->getValue();
|
||||||
if (!is_numeric($ruleValue)) {
|
if (!is_numeric($ruleValue)) {
|
||||||
// Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards
|
// Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards
|
||||||
|
|
Loading…
Reference in New Issue