Merge "OutputPage::showErrorPage raises a notice if arguments are incoherent"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 29 Jan 2014 16:10:21 +0000 (16:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Jan 2014 16:10:21 +0000 (16:10 +0000)
RELEASE-NOTES-1.23
includes/OutputPage.php

index 10caf6f..57080b7 100644 (file)
@@ -201,6 +201,7 @@ changes to languages because of Bugzilla reports.
 * (bug 52813) Preference "Show table of contents (for pages with more than
   3 headings)" was removed.
 * (bug 52810) Preference "Justify paragraphs" was removed.
+* OutputPage::showErrorPage raises a notice if arguments are incoherent.
 
 ==== Removed classes ====
 * FakeMemCachedClient (deprecated in 1.18)
index 04792cf..6d06693 100644 (file)
@@ -2147,6 +2147,9 @@ class OutputPage extends ContextSource {
                $this->prepareErrorPage( $title );
 
                if ( $msg instanceof Message ) {
+                       if ( $params !== array() ) {
+                               trigger_error( 'Argument ignored: $params. The message parameters argument is discarded when the $msg argument is a Message object instead of a string.', E_USER_NOTICE );
+                       }
                        $this->addHTML( $msg->parseAsBlock() );
                } else {
                        $this->addWikiMsgArray( $msg, $params );