* @todo Should be in Block.php?
* @param string $par Subpage parameter passed to setup, or data value from
* the HTMLForm
- * @param WebRequest $request Optionally try and get data from a request too
+ * @param WebRequest|null $request Optionally try and get data from a request too
* @return array [ User|string|null, Block::TYPE_ constant|null ]
*/
public static function getTargetAndType( $par, WebRequest $request = null ) {
if ( !$status->isOK() ) {
$errors = $status->getErrorsArray();
- return call_user_func_array( [ $form, 'msg' ], $errors[0] );
+ return $form->msg( ...$errors[0] );
} else {
return true;
}
/**
* Process the form on POST submission.
* @param array $data
- * @param HTMLForm $form
+ * @param HTMLForm|null $form
* @return bool|array True for success, false for didn't-try, array of errors on failure
*/
public function onSubmit( array $data, HTMLForm $form = null ) {