From 7417d974b0be868b766af5c597a031badcbece4c Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 2 Nov 2021 15:41:46 +0100 Subject: [PATCH] keep compatibility with PHP 5 on this one --- include/ws_functions/pwg.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/ws_functions/pwg.php b/include/ws_functions/pwg.php index c23bf376f..a930f5591 100644 --- a/include/ws_functions/pwg.php +++ b/include/ws_functions/pwg.php @@ -562,7 +562,11 @@ SELECT //Multidimentionnal sorting usort($filterable_users, function ($a, $b) { - return strtolower($a['username']) <=> strtolower($b['username']); + // compatible with PHP 7+ only + // return strtolower($a['username']) <=> strtolower($b['username']); + + // still compatible with PHP 5 + return (strtolower($a['username']) >= strtolower($b['username']) ? 1 : 0); }); // return $output_lines;