I don't actually know how this is getting hit, but it was in my testing,
although not reproducibly.
# Save a null revision in the page's history notifying of the move
$nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true );
# Save a null revision in the page's history notifying of the move
$nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true );
+ if ( !is_object( $nullRevision ) ) {
+ throw new MWException( 'No valid null revision produced in ' . __METHOD__ );
+ }
$nullRevId = $nullRevision->insertOn( $dbw );
$article = new Article( $this );
$nullRevId = $nullRevision->insertOn( $dbw );
$article = new Article( $this );