'Tags' => $params['tags'],
];
+ $status = SpecialBlock::validateTarget( $params['user'], $user );
+ if ( !$status->isOK() ) {
+ $this->dieStatus( $status );
+ }
+
$retval = SpecialBlock::processForm( $data, $this->getContext() );
if ( $retval !== true ) {
$this->dieStatus( $this->errorArrayToStatus( $retval ) );
$res['id'] = $block->getId();
} else {
# should be unreachable
- $res['expiry'] = '';
- $res['id'] = '';
+ $res['expiry'] = ''; // @codeCoverageIgnore
+ $res['id'] = ''; // @codeCoverageIgnore
}
$res['reason'] = $params['reason'];