aboutsummaryrefslogtreecommitdiffstats
path: root/includes/htmlform
diff options
context:
space:
mode:
authorDaimona Eaytoy <daimona.wiki@gmail.com>2019-10-12 17:13:38 +0200
committerDaimona Eaytoy <daimona.wiki@gmail.com>2019-10-22 10:09:13 +0200
commitb5f0d61ee4195f3daf0b56ebdef64e74394f4285 (patch)
tree60f57e699e517e0d1ab656803900cc282a9c3033 /includes/htmlform
parentb2baea07dd3f4026bf9e705500c3479756b56776 (diff)
downloadmediawikicore-b5f0d61ee4195f3daf0b56ebdef64e74394f4285.tar.gz
mediawikicore-b5f0d61ee4195f3daf0b56ebdef64e74394f4285.zip
Fix new phan errors, part 8
Bug: T231636 Change-Id: I61852ba55362ab9ae8cc8c1ab6b27565ce1d08e7
Diffstat (limited to 'includes/htmlform')
-rw-r--r--includes/htmlform/fields/HTMLMultiSelectField.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/htmlform/fields/HTMLMultiSelectField.php b/includes/htmlform/fields/HTMLMultiSelectField.php
index a34978d17b8b..26e7ca96bd05 100644
--- a/includes/htmlform/fields/HTMLMultiSelectField.php
+++ b/includes/htmlform/fields/HTMLMultiSelectField.php
@@ -162,7 +162,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
$optionsOouiSections
);
}
- '@phan-var array[] $optionsOouiSections';
+ '@phan-var array[][] $optionsOouiSections';
$out = [];
foreach ( $optionsOouiSections as $sectionLabel => $optionsOoui ) {
@@ -170,16 +170,18 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
$attr['name'] = "{$this->mName}[]";
$attr['value'] = $value;
- $attr['options'] = $optionsOoui;
- foreach ( $attr['options'] as &$option ) {
+ $options = $optionsOoui;
+ foreach ( $options as &$option ) {
$option['disabled'] = in_array( $option['data'], $this->mParams['disabled-options'], true );
}
if ( $this->mOptionsLabelsNotFromMessage ) {
- foreach ( $attr['options'] as &$option ) {
+ foreach ( $options as &$option ) {
$option['label'] = new OOUI\HtmlSnippet( $option['label'] );
}
}
+ unset( $option );
+ $attr['options'] = $options;
$attr += OOUI\Element::configFromHtmlAttributes(
$this->getAttributes( [ 'disabled', 'tabindex' ] )