From: Aaron Schulz Date: Sun, 25 Aug 2019 22:03:33 +0000 (-0700) Subject: Avoid PHP warning due to bogus second tideways_xhprof_enable() argument X-Git-Tag: 1.34.0-rc.0~554^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=163db3f30ff8ff23c6f985d8f941337800fcdfd5;p=lhc%2Fweb%2Fwiklou.git Avoid PHP warning due to bogus second tideways_xhprof_enable() argument Change-Id: I3d86d74e8a97eb578f392f9f1d918cc628d2bf4b --- diff --git a/includes/libs/Xhprof.php b/includes/libs/Xhprof.php index a1ddfd0772..575fbe754e 100644 --- a/includes/libs/Xhprof.php +++ b/includes/libs/Xhprof.php @@ -53,6 +53,12 @@ class Xhprof { if ( self::isEnabled() ) { throw new Exception( 'Profiling is already enabled.' ); } + + $args = [ $flags ]; + if ( $options ) { + $args[] = $options; + } + self::$enabled = true; self::callAny( [ @@ -60,7 +66,7 @@ class Xhprof { 'tideways_enable', 'tideways_xhprof_enable' ], - [ $flags, $options ] + $args ); }