Skip to content

Commit fa22418

Browse files
committed
Fixing the multidimensional array as value for the widget's parameter
1 parent 8dfe26a commit fa22418

File tree

2 files changed

+10
-2
lines changed
  • app/code/Magento/Widget/Block/Adminhtml/Widget
  • lib/internal/Magento/Framework/Data/Form/Element

2 files changed

+10
-2
lines changed

app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ protected function _addField($parameter)
166166

167167
if (is_array($data['value'])) {
168168
foreach ($data['value'] as &$value) {
169-
$value = html_entity_decode($value);
169+
if (!is_array($value)) {
170+
$value = html_entity_decode($value);
171+
}
170172
}
171173
} else {
172174
$data['value'] = html_entity_decode($data['value']);

lib/internal/Magento/Framework/Data/Form/Element/Label.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ public function __construct(
3737
public function getElementHtml()
3838
{
3939
$html = $this->getBold() ? '<div class="control-value special">' : '<div class="control-value">';
40-
$html .= $this->getEscapedValue() . '</div>';
40+
if (is_array($this->getValue())) {
41+
$html .= '</div>';
42+
} else {
43+
$html .= $this->getEscapedValue() . '</div>';
44+
}
45+
4146
$html .= $this->getAfterElementHtml();
47+
4248
return $html;
4349
}
4450
}

0 commit comments

Comments
 (0)