X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Factions%2FRollbackAction.php;h=aa2858d8e3c6e20455f3cd9310900113ccbc9398;hp=3e760fd99b6f43dcd494f1de282825852fd31faa;hb=7874fc4bec845ad92960b07e969c65f3c3fe74f2;hpb=ff13c3d92a3357d2cbb03c4d58dfc33999942b0a 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(),