From: Erik Bernhardson Date: Fri, 8 Jun 2018 21:33:02 +0000 (-0700) Subject: Resolve required parameter after optional in Message X-Git-Tag: 1.34.0-rc.0~5139^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=aa7612e030318bb1ab910cad169e8ff499b2c2b9;p=lhc%2Fweb%2Fwiklou.git Resolve required parameter after optional in Message It looks like this parameter has had a default since it was first created, and somehow kept it even after a new parameter was added to the end. codesearch.wmflabs.org suggests, and I could not find, and calls to this function from any other code that would need the defaulted param (probably because they fail due to the later required parameter). Change-Id: Iae6e736c5c957d9fccb6ab5813a3b5b02eeb3f6f --- diff --git a/includes/Message.php b/includes/Message.php index fb6dcc5466..84ab7ca703 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -1128,7 +1128,7 @@ class Message implements MessageSpecifier, Serializable { * * @return string */ - protected function replaceParameters( $message, $type = 'before', $format ) { + protected function replaceParameters( $message, $type, $format ) { // A temporary marker for $1 parameters that is only valid // in non-attribute contexts. However if the entire message is escaped // then we don't want to use it because it will be mangled in all contexts