X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiOptions.php;h=8bfe447df59c4e5a3abf6eb4bbc235596a025642;hb=724b2cf91205cc1b09c5677a8c01e34978717d4a;hp=e51d46d91a780ddaa1c63a414de7b7ed95e5a549;hpb=2f885ee6b797e5a176ce7b270b674a04b5945b06;p=lhc%2Fweb%2Fwiklou.git 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':