From ee2200fa7c799ed8a586358008a5b85f01e0a1c5 Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Wed, 24 Apr 2019 08:37:18 +0200 Subject: [PATCH] Replaced sort with natsort. --- src/ExaBGP/VoIPBL/Loader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ExaBGP/VoIPBL/Loader.php b/src/ExaBGP/VoIPBL/Loader.php index 49ae1f6..75325a3 100644 --- a/src/ExaBGP/VoIPBL/Loader.php +++ b/src/ExaBGP/VoIPBL/Loader.php @@ -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); } @@ -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(); @@ -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']); }