From 0ae7dad1487141a263e5e62181a871d998564bd3 Mon Sep 17 00:00:00 2001 From: Func Date: Sat, 15 Jan 2022 06:00:57 +0000 Subject: [PATCH] HTMLForm: Pass field data instead of fields to filter I believe there is a mistake, since DefaultPreferencesFactory::cleanSignature() uses it as field data, which is the only filter applied in the core. Change-Id: Ic7aa509a3e5fd3a3c717259d83d5bf0a26d3556a --- includes/htmlform/HTMLForm.php | 2 +- includes/htmlform/HTMLFormField.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 379ef0f501a..f135a9e900e 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -2036,7 +2036,7 @@ class HTMLForm extends ContextSource { # Filter data. foreach ( $fieldData as $name => &$value ) { $field = $this->mFlatFields[$name]; - $value = $field->filter( $value, $this->mFlatFields ); + $value = $field->filter( $value, $fieldData ); } $this->mFieldData = $fieldData; diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 746cddb50e3..4c9c518e993 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -353,7 +353,7 @@ abstract class HTMLFormField { * @stable to override * * @param mixed $value - * @param HTMLFormField[] $alldata + * @param mixed[] $alldata * * @return mixed */