Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Winkler <git@lw1.at>2021-06-04 20:09:20 +0300
committerGitHub <noreply@github.com>2021-06-04 20:09:20 +0300
commit72a83dedec5d1c86237f6b5a5857f9b448662b8b (patch)
treeb58329604de99a57581fe7e375996ba3180d5a8d /core/Profiler.php
parent8b4b8ce017c15a534101fc10494a9f05cb824a58 (diff)
fix usort() in SQL Profiler (#17645)
Diffstat (limited to 'core/Profiler.php')
-rw-r--r--core/Profiler.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/Profiler.php b/core/Profiler.php
index 1f69c24266..4b21ddc803 100644
--- a/core/Profiler.php
+++ b/core/Profiler.php
@@ -100,12 +100,18 @@ class Profiler
private static function maxSumMsFirst($a, $b)
{
- return $a['sum_time_ms'] < $b['sum_time_ms'];
+ if ($a['sum_time_ms'] == $b['sum_time_ms']) {
+ return 0;
+ }
+ return ($a['sum_time_ms'] < $b['sum_time_ms']) ? -1 : 1;
}
private static function sortTimeDesc($a, $b)
{
- return $a['sumTimeMs'] < $b['sumTimeMs'];
+ if ($a['sumTimeMs'] == $b['sumTimeMs']) {
+ return 0;
+ }
+ return ($a['sumTimeMs'] < $b['sumTimeMs']) ? -1 : 1;
}
/**