mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Fix incorrect rule selection when deleting rules with same long URL
This commit is contained in:
@@ -168,7 +168,9 @@ class RedirectRuleHandler implements RedirectRuleHandlerInterface
|
||||
{
|
||||
$choices = [];
|
||||
foreach ($currentRules as $index => $rule) {
|
||||
$choices[$rule->longUrl] = $index + 1;
|
||||
$priority = $index + 1;
|
||||
$key = sprintf('%s - %s', $priority, $rule->longUrl);
|
||||
$choices[$key] = $priority;
|
||||
}
|
||||
|
||||
$resp = $io->choice($message, array_flip($choices));
|
||||
|
||||
Reference in New Issue
Block a user