jenkins-bot has submitted this change and it was merged.

Change subject: Fix title library saving
......................................................................


Fix title library saving

getParser() sometimes returns null (eg: on saving edits). In that case,
don't try injecting link information into the (non-existent)
ParserOutput object.

Change-Id: Ief544922228615fbf674305bff95f874d56b7866
---
M engines/LuaCommon/TitleLibrary.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/engines/LuaCommon/TitleLibrary.php 
b/engines/LuaCommon/TitleLibrary.php
index 817c869..b97c68c 100644
--- a/engines/LuaCommon/TitleLibrary.php
+++ b/engines/LuaCommon/TitleLibrary.php
@@ -64,7 +64,9 @@
                $this->idCache[$title->getArticleID()] = $title;
 
                // Record a link
-               $this->getParser()->getOutput()->addLink( $title );
+               if ( $this->getParser() ) {
+                       $this->getParser()->getOutput()->addLink( $title );
+               }
 
                return array(
                        'isLocal' => (bool)$title->isLocal(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief544922228615fbf674305bff95f874d56b7866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to