Merge "Revision::newNullRevision don't pass null to RevisionStore"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 11 Jan 2018 14:27:06 +0000 (14:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 11 Jan 2018 14:27:06 +0000 (14:27 +0000)
includes/Revision.php

index 0844e89..b653f7f 100644 (file)
@@ -1065,7 +1065,11 @@ class Revision implements IDBAccessObject {
 
                $comment = CommentStoreComment::newUnsavedComment( $summary, null );
 
-               $title = Title::newFromID( $pageId );
+               $title = Title::newFromID( $pageId, Title::GAID_FOR_UPDATE );
+               if ( $title === null ) {
+                       return null;
+               }
+
                $rec = self::getRevisionStore()->newNullRevision( $dbw, $title, $comment, $minor, $user );
 
                return new Revision( $rec );