Avoid use of func_get_args()

Change-Id: I2b0f50e00cd2c7ba744c75f623b0349930cdfd62
This commit is contained in:
Kunal Mehta 2019-03-09 18:34:56 -08:00
parent 4ca49737a4
commit 1c79c4a2ec

View file

@ -205,15 +205,13 @@ abstract class MathRenderer {
* Returns an internationalized HTML error string
*
* @param string $msg message key for specific error
* @note param \Varargs $parameters (optional) zero
* or more message parameters for specific error
* @param string ...$parameters zero or more message
* parameters for specific error
*
* @return string HTML error string
*/
public function getError( $msg /*, ... */ ) {
public function getError( $msg, ...$parameters ) {
$mf = wfMessage( 'math_failure' )->inContentLanguage()->escaped();
$parameters = func_get_args();
array_shift( $parameters );
$errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped();
$source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) );
return "<strong class='error texerror'>$mf ($errmsg): $source</strong>\n";