X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FXhprofData.php;h=90e52f08ddc6611e4377be47c39aac1c2c467670;hb=a97171eaff1c42b5b5b036766b4cbe9cdb80a769;hp=5af22ed5b2081467ee303e28c995f35bba5702d4;hpb=11ee7f78da9776db26098642a151a288f98bea14;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/XhprofData.php b/includes/libs/XhprofData.php index 5af22ed5b2..90e52f08dd 100644 --- a/includes/libs/XhprofData.php +++ b/includes/libs/XhprofData.php @@ -370,11 +370,10 @@ class XhprofData { return function ( $a, $b ) use ( $key, $sub ) { if ( isset( $a[$key] ) && isset( $b[$key] ) ) { // Descending sort: larger values will be first in result. - // Assumes all values are numeric. // Values for 'main()' will not have sub keys $valA = is_array( $a[$key] ) ? $a[$key][$sub] : $a[$key]; $valB = is_array( $b[$key] ) ? $b[$key][$sub] : $b[$key]; - return $valB - $valA; + return $valB <=> $valA; } else { // Sort datum with the key before those without return isset( $a[$key] ) ? -1 : 1;