Revision::getContent can return null, which would here result in a fatal
error. Return false to indicate that this undo is not possible.
Change-Id: I6f6b4b59e86f9762f61c50dd65f81a7256c5255a
$undo_content = $undo->getContent();
$undoafter_content = $undoafter->getContent();
+ if ( !$undo_content || !$undoafter_content ) {
+ return false; // no content to undo
+ }
+
$this->checkModelID( $cur_content->getModel() );
$this->checkModelID( $undo_content->getModel() );
$this->checkModelID( $undoafter_content->getModel() );