File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ class ListAction extends \Magento\Backend\App\AbstractAction
13
13
public function execute ()
14
14
{
15
15
$ severity = $ this ->getRequest ()->getParam ('severity ' );
16
+ $ default = array (
17
+ 'severity ' => $ severity ,
18
+ 'text ' => 'All recent issues have been fixed. Please refresh the screen for an update. '
19
+ );
16
20
$ messageCollection = $ this ->_objectManager ->get (
17
21
'Magento\AdminNotification\Model\Resource\System\Message\Collection '
18
22
);
@@ -23,6 +27,9 @@ public function execute()
23
27
foreach ($ messageCollection ->getItems () as $ item ) {
24
28
$ result [] = ['severity ' => $ item ->getSeverity (), 'text ' => $ item ->getText ()];
25
29
}
30
+ if (empty ($ result )) {
31
+ $ result [] = $ default ;
32
+ }
26
33
$ this ->getResponse ()->representJson (
27
34
$ this ->_objectManager ->get ('Magento\Core\Helper\Data ' )->jsonEncode ($ result )
28
35
);
You can’t perform that action at this time.
0 commit comments