From 6b5dcf87183a75b3216928bba1be09e6014c3047 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 18 Nov 2015 01:24:20 +0000 Subject: [PATCH] profileinfo: Suppress frivolous warning about usort callback When sorting the profile output by a column (e.g. ms/call) the following error appears: > PHP Warning: > usort(): Array was modified by the user comparison function at profileinfo.php:439 This is a known bug in PHP where usage of certain debug features can cause usort() to detect reference count change and wrongly claim that the object was changed. Change-Id: I89ec0149aae46f51de647cdf6c6d645c45cbc185 --- profileinfo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/profileinfo.php b/profileinfo.php index f44ee5a231..609ea9538c 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -436,7 +436,9 @@ if ( isset( $_REQUEST['filter'] ) ) { } $points[] = $s; - usort( $points, 'compare_point' ); + // @codingStandardsIgnoreStart + @usort( $points, 'compare_point' ); + // @codingStandardsIgnoreEnd foreach ( $points as $point ) { if ( strlen( $filter ) && !strstr( $point->name(), $filter ) ) { -- 2.20.1