File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -261,17 +261,19 @@ protected function _getPluginButtonsHtml($visible = true)
261261 );
262262 }
263263
264- foreach ($ this ->getConfig ('plugins ' ) as $ plugin ) {
265- if (isset ($ plugin ['options ' ]) && $ this ->_checkPluginButtonOptions ($ plugin ['options ' ])) {
266- $ buttonOptions = $ this ->_prepareButtonOptions ($ plugin ['options ' ]);
267- if (!$ visible ) {
268- $ configStyle = '' ;
269- if (isset ($ buttonOptions ['style ' ])) {
270- $ configStyle = $ buttonOptions ['style ' ];
264+ if (is_array ($ this ->getConfig ('plugins ' ))) {
265+ foreach ($ this ->getConfig ('plugins ' ) as $ plugin ) {
266+ if (isset ($ plugin ['options ' ]) && $ this ->_checkPluginButtonOptions ($ plugin ['options ' ])) {
267+ $ buttonOptions = $ this ->_prepareButtonOptions ($ plugin ['options ' ]);
268+ if (!$ visible ) {
269+ $ configStyle = '' ;
270+ if (isset ($ buttonOptions ['style ' ])) {
271+ $ configStyle = $ buttonOptions ['style ' ];
272+ }
273+ $ buttonOptions = array_merge ($ buttonOptions , ['style ' => 'display:none; ' . $ configStyle ]);
271274 }
272- $ buttonOptions = array_merge ( $ buttonOptions , [ ' style ' => ' display:none; ' . $ configStyle ] );
275+ $ buttonsHtml .= $ this -> _getButtonHtml ( $ buttonOptions );
273276 }
274- $ buttonsHtml .= $ this ->_getButtonHtml ($ buttonOptions );
275277 }
276278 }
277279
You can’t perform that action at this time.
0 commit comments