Use real varargs in OutputPage
Change-Id: I24821df0299d18a81e89d2e10671937f65c88bd8
This commit is contained in:
parent
3440ae000c
commit
fba5bbe5cd
1 changed files with 5 additions and 5 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue