Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320550

Change subject: Always use parse in Message::__toString()
......................................................................

Always use parse in Message::__toString()

Bug: T146416
Change-Id: Ia9b2a1dcf09d52348b2c6d8299fd849b809f6e74
---
M includes/Message.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/320550/1

diff --git a/includes/Message.php b/includes/Message.php
index c1a12aa..e177858 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -853,9 +853,10 @@
         */
        public function __toString() {
                if ( $this->format !== 'parse' ) {
-                       $ex = new LogicException( __METHOD__ . ' using implicit 
format: ' . $this->format );
+                       $ex = new LogicException( __METHOD__ . ' ignoring 
implicit format: ' . $this->format );
                        \MediaWiki\Logger\LoggerFactory::getInstance( 
'message-format' )->warning(
                                $ex->getMessage(), [ 'exception' => $ex, 
'format' => $this->format, 'key' => $this->key ] );
+                       $this->format = 'parse';
                }
 
                // PHP doesn't allow __toString to throw exceptions and will

-- 
To view, visit https://gerrit.wikimedia.org/r/320550
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9b2a1dcf09d52348b2c6d8299fd849b809f6e74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to