Avoid use of func_get_args()
Change-Id: I2b0f50e00cd2c7ba744c75f623b0349930cdfd62
This commit is contained in:
parent
4ca49737a4
commit
1c79c4a2ec
|
@ -205,15 +205,13 @@ abstract class MathRenderer {
|
||||||
* Returns an internationalized HTML error string
|
* Returns an internationalized HTML error string
|
||||||
*
|
*
|
||||||
* @param string $msg message key for specific error
|
* @param string $msg message key for specific error
|
||||||
* @note param \Varargs $parameters (optional) zero
|
* @param string ...$parameters zero or more message
|
||||||
* or more message parameters for specific error
|
* parameters for specific error
|
||||||
*
|
*
|
||||||
* @return string HTML error string
|
* @return string HTML error string
|
||||||
*/
|
*/
|
||||||
public function getError( $msg /*, ... */ ) {
|
public function getError( $msg, ...$parameters ) {
|
||||||
$mf = wfMessage( 'math_failure' )->inContentLanguage()->escaped();
|
$mf = wfMessage( 'math_failure' )->inContentLanguage()->escaped();
|
||||||
$parameters = func_get_args();
|
|
||||||
array_shift( $parameters );
|
|
||||||
$errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped();
|
$errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped();
|
||||||
$source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) );
|
$source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) );
|
||||||
return "<strong class='error texerror'>$mf ($errmsg): $source</strong>\n";
|
return "<strong class='error texerror'>$mf ($errmsg): $source</strong>\n";
|
||||||
|
|
Loading…
Reference in New Issue