$data = array(
'Target' => is_null( $params['id'] ) ? $params['user'] : "#{$params['id']}",
- 'Reason' => is_null( $params['reason'] ) ? '' : $params['reason']
+ 'Reason' => $params['reason']
);
$block = Block::newFromTarget( $data['Target'] );
$retval = SpecialUnblock::processUnblock( $data, $this->getContext() );
ApiBase::PARAM_DFLT => false,
ApiBase::PARAM_DEPRECATED => true,
),
- 'reason' => null,
+ 'reason' => '',
);
}
'user' => "Username, IP address or IP range you want to unblock. Cannot be used together with {$p}id",
'token' => "An unblock token previously obtained through prop=info",
'gettoken' => 'If set, an unblock token will be returned, and no other action will be taken',
- 'reason' => 'Reason for unblock (optional)',
+ 'reason' => 'Reason for unblock',
);
}