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 @@ -254,17 +254,19 @@ protected function _getPluginButtonsHtml($visible = true)
254
254
);
255
255
}
256
256
257
- foreach ($ this ->getConfig ('plugins ' ) as $ plugin ) {
258
- if (isset ($ plugin ['options ' ]) && $ this ->_checkPluginButtonOptions ($ plugin ['options ' ])) {
259
- $ buttonOptions = $ this ->_prepareButtonOptions ($ plugin ['options ' ]);
260
- if (!$ visible ) {
261
- $ configStyle = '' ;
262
- if (isset ($ buttonOptions ['style ' ])) {
263
- $ configStyle = $ buttonOptions ['style ' ];
257
+ if (is_array ($ this ->getConfig ('plugins ' ))) {
258
+ foreach ($ this ->getConfig ('plugins ' ) as $ plugin ) {
259
+ if (isset ($ plugin ['options ' ]) && $ this ->_checkPluginButtonOptions ($ plugin ['options ' ])) {
260
+ $ buttonOptions = $ this ->_prepareButtonOptions ($ plugin ['options ' ]);
261
+ if (!$ visible ) {
262
+ $ configStyle = '' ;
263
+ if (isset ($ buttonOptions ['style ' ])) {
264
+ $ configStyle = $ buttonOptions ['style ' ];
265
+ }
266
+ $ buttonOptions = array_merge ($ buttonOptions , ['style ' => 'display:none; ' . $ configStyle ]);
264
267
}
265
- $ buttonOptions = array_merge ( $ buttonOptions , [ ' style ' => ' display:none; ' . $ configStyle ] );
268
+ $ buttonsHtml .= $ this -> _getButtonHtml ( $ buttonOptions );
266
269
}
267
- $ buttonsHtml .= $ this ->_getButtonHtml ($ buttonOptions );
268
270
}
269
271
}
270
272
You can’t perform that action at this time.
0 commit comments