getContent can return null

Change-Id: I535294682b59fea6c465828facd668b4f60efe6c
This commit is contained in:
jdlrobson 2021-09-02 21:18:57 -07:00 committed by Jdlrobson
parent c2fb14e9c1
commit 3f0322e16c

View file

@ -288,6 +288,16 @@ class GenerateSampleNotifications extends Maintenance {
$undoContent = $undoRev->getContent( SlotRecord::MAIN );
$previousContent = $previous->getContent( SlotRecord::MAIN );
if ( !$undoContent ) {
$this->error( "Failed to undo {$moai->getPrefixedText()}: undoContent is null." );
return;
}
if ( !$previousContent ) {
$this->error( "Failed to undo {$moai->getPrefixedText()}: previousContent is null." );
return;
}
$content = $handler->getUndoContent(
$undoContent,
$undoContent,