From 95da30a224247faa1ff30007bfa797c8f6676d08 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 10 Jan 2024 16:41:39 +0100 Subject: [PATCH] Fix: files.lib.php - Add optional sort parameter to array_multisort for static tool check (#27340) # Fix: files.lib.php - Add optional sort parameter to array_multisort for static tool check Phan flags the call to array_multisort as suspicious - adding the optional sort parameter avoids this. --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index f271fe5505b..6b4b56e1475 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -292,7 +292,7 @@ function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $s } // Sort the data if ($sortorder) { - array_multisort($myarray, $sortorder, $file_list); + array_multisort($myarray, $sortorder, SORT_REGULAR, $file_list); } }