Use real varargs in OutputPage

Change-Id: I24821df0299d18a81e89d2e10671937f65c88bd8
This commit is contained in:
Umherirrender 2019-10-11 20:17:48 +02:00
parent 3440ae000c
commit fba5bbe5cd

View file

@ -3992,9 +3992,10 @@ class OutputPage extends ContextSource {
* This is equivalent to:
*
* $wgOut->addWikiText( wfMessage( ... )->plain() )
*
* @param mixed ...$args
*/
public function addWikiMsg( /*...*/ ) {
$args = func_get_args();
public function addWikiMsg( ...$args ) {
$name = array_shift( $args );
$this->addWikiMsgArray( $name, $args );
}
@ -4035,10 +4036,9 @@ class OutputPage extends ContextSource {
* The newline after the opening div is needed in some wikitext. See T21226.
*
* @param string $wrap
* @param mixed ...$msgSpecs
*/
public function wrapWikiMsg( $wrap /*, ...*/ ) {
$msgSpecs = func_get_args();
array_shift( $msgSpecs );
public function wrapWikiMsg( $wrap, ...$msgSpecs ) {
$msgSpecs = array_values( $msgSpecs );
$s = $wrap;
foreach ( $msgSpecs as $n => $spec ) {