From e6f7c2fe020a4a73fcebf51d88a0fbfab68dc339 Mon Sep 17 00:00:00 2001 From: Carl Richter Date: Thu, 1 Aug 2019 17:57:30 +0200 Subject: [PATCH] fix natural sorting --- src/Module/ModulePropertyReader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/ModulePropertyReader.php b/src/Module/ModulePropertyReader.php index b35a7cb..a5e7c07 100644 --- a/src/Module/ModulePropertyReader.php +++ b/src/Module/ModulePropertyReader.php @@ -126,8 +126,8 @@ protected function getImages($blob) { protected static function sortByName($a, $b) { if (strcmp($a['name'], $b['name']) === 0) return 0; $compare = [$a['name'], $b['name']]; - natsort($compare); - return (strcmp($compare[0], $a['name']) === 0) ? 1 : -1; + sort($compare, SORT_NATURAL); + return (strcmp($compare[0], $a['name']) === 0) ? -1 : 1; } protected static function sortByNumber($a, $b) {