From: Timo Tijhof Date: Wed, 18 Nov 2015 01:24:20 +0000 (+0000) Subject: profileinfo: Suppress frivolous warning about usort callback X-Git-Tag: 1.31.0-rc.0~8954^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=commitdiff_plain;h=6b5dcf87183a75b3216928bba1be09e6014c3047;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ) {