From: Mark A. Hershberger Date: Mon, 2 Apr 2018 22:22:42 +0000 (-0400) Subject: Use MediaWiki\SuppressWarnings around trigger_error('') instead @ X-Git-Tag: 1.34.0-rc.0~3217^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=d68806c03b88b72eda1ca668c5c7b69f5981a46d;p=lhc%2Fweb%2Fwiklou.git Use MediaWiki\SuppressWarnings around trigger_error('') instead @ The @ sign requires a phpcs:ignore. \MediaWiki\suppressWarnings() doesn't need a phpcs:ignore. Bug: T191247 Change-Id: I6ef1e706f4f2a4192dde7a668b3b97086a4a8a68 --- diff --git a/includes/shell/Command.php b/includes/shell/Command.php index d9fa82dfa3..7b21c06ebf 100644 --- a/includes/shell/Command.php +++ b/includes/shell/Command.php @@ -433,8 +433,9 @@ class Command { // TODO replace with clear_last_error when requirements are bumped to PHP7 set_error_handler( function () { }, 0 ); - // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged - @trigger_error( '' ); + \MediaWiki\suppressWarnings(); + trigger_error( '' ); + \MediaWiki\restoreWarnings(); restore_error_handler(); $readPipes = wfArrayFilterByKey( $pipes, function ( $fd ) use ( $desc ) {