From fb430f257ec8d61405bd2d605bdc399f89d935f1 Mon Sep 17 00:00:00 2001 From: Adam Wight Date: Fri, 22 Nov 2019 23:20:04 +0100 Subject: [PATCH] Fix variadic parameters in error reporter Give these functions the same signature as `->msg()` Change-Id: Ib90df52d6752512d7d9dddf51777c9c23c847e06 --- src/CiteErrorReporter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CiteErrorReporter.php b/src/CiteErrorReporter.php index b9fd41abe..ff2f441b3 100644 --- a/src/CiteErrorReporter.php +++ b/src/CiteErrorReporter.php @@ -50,11 +50,11 @@ class CiteErrorReporter { * @return-taint tainted */ public function plain( $key, ...$params ) { - $msg = wfMessage( $key, $params )->inLanguage( $this->language ); + $msg = wfMessage( $key, ...$params )->inLanguage( $this->language ); - if ( strncmp( $key, 'cite_warning_', 13 ) === 0 ) { + if ( strncmp( $msg->getKey(), 'cite_warning_', 13 ) === 0 ) { $type = 'warning'; - $id = substr( $key, 13 ); + $id = substr( $msg->getKey(), 13 ); $extraClass = ' mw-ext-cite-warning-' . Sanitizer::escapeClass( $id ); } else { $type = 'error';