// 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 = array_filter( $pipes, function ( $fd ) use ( $desc ) {
return new Result( $retval, $buffers[1], $buffers[2] );
}
+
+ /**
+ * Returns the final command line before environment/limiting, etc are applied.
+ * Use string conversion only for debugging, don't try to pass this to
+ * some other execution medium.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "#Command: {$this->command}";
+ }
}