Skip to content

Commit

Permalink
UrlMigrator: Don't use all available options if none match
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Mar 21, 2024
1 parent a034449 commit 93b0baf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions library/Icingadb/Compat/UrlMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,14 @@ protected function rewrite(Filter\Rule $filter, array $legacyColumns)
case $exprRule === self::LOWER_EXPR:
$filter->setValue(strtolower($filter->getValue()));
break;
case is_array($exprRule) && isset($exprRule[$filter->getValue()]):
$filter->setValue($exprRule[$filter->getValue()]);
break;
case is_array($exprRule):
if (isset($exprRule[$filter->getValue()])) {
$filter->setValue($exprRule[$filter->getValue()]);

break;
}

return false;
default:
$filter->setValue($exprRule);
}
Expand Down

0 comments on commit 93b0baf

Please sign in to comment.