Resolve required parameter after optional in Message
authorErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 8 Jun 2018 21:33:02 +0000 (14:33 -0700)
committerEBernhardson <ebernhardson@wikimedia.org>
Fri, 8 Jun 2018 21:48:51 +0000 (21:48 +0000)
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

includes/Message.php

index fb6dcc5..84ab7ca 100644 (file)
@@ -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