Skip to content

Commit

Permalink
Replaced sort with natsort.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertHauwaerts committed Apr 24, 2019
1 parent f7a201a commit ee2200f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ExaBGP/VoIPBL/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private function updateBlacklists()
if ($voipbl || $localbl) {
$this->aggrbl = array_merge($this->voipbl['data'], $this->localbl['data']);

sort($this->aggrbl, SORT_NUMERIC);
natsort($this->aggrbl);
array_unique($this->aggrbl);
}

Expand Down Expand Up @@ -280,7 +280,7 @@ private function updateBlacklistVoIPBL()
$this->voipbl['data'] = array_filter($this->voipbl['data'], [$this->validator, 'isNotPrivateIP']);
}

sort($this->voipbl['data'], SORT_NUMERIC);
natsort($this->voipbl['data']);
array_unique($this->voipbl['data']);

$this->voipbl['updated'] = time();
Expand Down Expand Up @@ -329,7 +329,7 @@ private function updateBlacklistLocal()
$this->localbl['data'] = array_filter($this->localbl['data'], [$this->validator, 'isNotPrivateIP']);
}

sort($this->localbl['data'], SORT_NUMERIC);
natsort($this->localbl['data']);
array_unique($this->localbl['data']);
}

Expand Down

0 comments on commit ee2200f

Please sign in to comment.