diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php index 6c14e5e5a2b31..36b913059737a 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php @@ -254,17 +254,19 @@ protected function _getPluginButtonsHtml($visible = true) ); } - foreach ($this->getConfig('plugins') as $plugin) { - if (isset($plugin['options']) && $this->_checkPluginButtonOptions($plugin['options'])) { - $buttonOptions = $this->_prepareButtonOptions($plugin['options']); - if (!$visible) { - $configStyle = ''; - if (isset($buttonOptions['style'])) { - $configStyle = $buttonOptions['style']; + if (is_array($this->getConfig('plugins'))) { + foreach ($this->getConfig('plugins') as $plugin) { + if (isset($plugin['options']) && $this->_checkPluginButtonOptions($plugin['options'])) { + $buttonOptions = $this->_prepareButtonOptions($plugin['options']); + if (!$visible) { + $configStyle = ''; + if (isset($buttonOptions['style'])) { + $configStyle = $buttonOptions['style']; + } + $buttonOptions = array_merge($buttonOptions, ['style' => 'display:none;' . $configStyle]); } - $buttonOptions = array_merge($buttonOptions, ['style' => 'display:none;' . $configStyle]); + $buttonsHtml .= $this->_getButtonHtml($buttonOptions); } - $buttonsHtml .= $this->_getButtonHtml($buttonOptions); } }