X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMessage.php;h=57c6264dfa98e95aa1b7264dad7a6002af3d83ce;hb=3195d2ab7ff55e2633ddcfa86188f61f1fd26184;hp=208f96e0f1bf8bdef574d7a9806b62e941bc4e6b;hpb=6985d304dbf855562432464d868ad5eae704a416;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Message.php b/includes/Message.php index 208f96e0f1..57c6264dfa 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -799,7 +799,7 @@ class Message { * @return Tuple(type, value) */ protected function extractParam( $param ) { - if ( is_array( $param ) ){ + if ( is_array( $param ) ) { if ( isset( $param['raw'] ) ) { return array( 'after', $param['raw'] ); } elseif ( isset( $param['num'] ) ) { @@ -823,6 +823,11 @@ class Message { ); return array( 'before', '[INVALID]' ); } + } elseif ( $param instanceof Message ) { + // Message objects should not be before parameters because + // then they'll get double escaped. If the message needs to be + // escaped, it'll happen right here when we call toString(). + return array( 'after', $param->toString() ); } else { return array( 'before', $param ); }