X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Factions%2FRollbackAction.php;h=aa2858d8e3c6e20455f3cd9310900113ccbc9398;hb=a3b1ef7c21ba9af94f611f6ca1d64e75710db176;hp=3e760fd99b6f43dcd494f1de282825852fd31faa;hpb=7dd1914e734ccd7c2842bb2e18bf4866a4ecbf63;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php index 3e760fd99b..aa2858d8e3 100644 --- a/includes/actions/RollbackAction.php +++ b/includes/actions/RollbackAction.php @@ -54,9 +54,12 @@ class RollbackAction extends FormlessAction { $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(),