File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,8 @@ public function execute()
19
19
$ response ->setError (false );
20
20
$ widgetInstance = $ this ->_initWidgetInstance ();
21
21
$ result = $ widgetInstance ->validate ();
22
- if ($ result instanceof \Magento \Framework \Phrase) {
23
- $ result = (string ) $ result ;
24
- }
25
- if ($ result !== true && is_string ($ result )) {
26
- $ this ->messageManager ->addError ($ result );
22
+ if ($ result !== true && (is_string ($ result ) || $ result instanceof \Magento \Framework \Phrase)) {
23
+ $ this ->messageManager ->addError ((string ) $ result );
27
24
$ this ->_view ->getLayout ()->initMessages ();
28
25
$ response ->setError (true );
29
26
$ response ->setHtmlMessage ($ this ->_view ->getLayout ()->getMessagesBlock ()->getGroupedHtml ());
You can’t perform that action at this time.
0 commit comments