X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStatus.php;h=795fd4572afba9f8f9c4b5529021c6232957f37d;hb=f07ffa11f40b7263310b081132ab92f358a4b5b3;hp=e11ba03bdf3fc0424af5839fcb6c78aec33d787a;hpb=6abd85ca9210551ad8f09d2d2424350fc0b21cb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Status.php b/includes/Status.php index e11ba03bdf..795fd4572a 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -224,9 +224,11 @@ class Status { /** * Get the error list as a Message object * - * @param string $shortContext a short enclosing context message name, to - * be used when there is a single error - * @param string $longContext a long enclosing context message name, for a list + * @param string|string[] $shortContext A short enclosing context message name (or an array of + * message names), to be used when there is a single error. + * @param string|string[] $longContext A long enclosing context message name (or an array of + * message names), for a list. + * * @return Message */ public function getMessage( $shortContext = false, $longContext = false ) { @@ -256,13 +258,13 @@ class Status { $msgCount++; } - $wrapper = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) ); - $s = $wrapper->params( $msgs )->parse(); + $s = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) ); + $s->params( $msgs )->parse(); if ( $longContext ) { - $s = wfMessage( $longContext, $wrapper ); + $s = wfMessage( $longContext, $s ); } elseif ( $shortContext ) { - $wrapper = new RawMessage( "\n\$1\n", $wrapper ); + $wrapper = new RawMessage( "\n\$1\n", $s ); $wrapper->parse(); $s = wfMessage( $shortContext, $wrapper ); }