From 93c5cc236a84c1a334b9a596dbc0739ea9c28972 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Wed, 4 May 2016 17:09:18 +0200 Subject: [PATCH] ApiOptions: set form field parent earlier Bug: T134351 Change-Id: I44b9bbd1663c876cf0c6160f10badfd8f380656b --- includes/api/ApiOptions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index e51d46d91a..8bfe447df5 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -86,8 +86,7 @@ class ApiOptions extends ApiBase { // We need a dummy HTMLForm for the validate callback... $htmlForm = new HTMLForm( [], $this ); } - $field = HTMLForm::loadInputFromParameters( $key, $prefs[$key] ); - $field->mParent = $htmlForm; + $field = HTMLForm::loadInputFromParameters( $key, $prefs[$key], $htmlForm ); $validation = $field->validate( $value, $user->getOptions() ); break; case 'registered-multiselect': -- 2.20.1