$user = $this->getUser();
$from = $request->getVal( 'from' );
$rev = $this->page->getRevision();
- if ( $from === null || $from === '' ) {
+ if ( $from === null ) {
throw new ErrorPageError( 'rollbackfailed', 'rollback-missingparam' );
}
+ if ( !$rev ) {
+ throw new ErrorPageError( 'rollbackfailed', 'rollback-missingrevision' );
+ }
if ( $from !== $rev->getUserText() ) {
throw new ErrorPageError( 'rollbackfailed', 'alreadyrolled', [
$this->getTitle()->getPrefixedText(),
}
}
- return true;
+ return;
}
# NOTE: Permission errors already handled by Action::checkExecute.
);
$de->showDiff( '', '' );
}
- return true;
+ return;
}
protected function getDescription() {