Skip to content

Commit c2d6a46

Browse files
committed
MAGETWO-97949: Invalid action behavior
1 parent 5a0dca2 commit c2d6a46

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app/code/Magento/Reports/Controller/Adminhtml/Report/AbstractReport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function _showLastExecutionTime($flagCode, $refreshCode)
156156
$this->messageManager->addNotice(
157157
__(
158158
'Last updated: %1. To refresh last day\'s <a href="%2">statistics</a>, ' .
159-
'click <a href="#2" data-post="%3">here</a>.',
159+
'click <a href="#" data-post="%3">here</a>.',
160160
$updatedAt,
161161
$refreshStatsLink,
162162
str_replace(

app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ public function execute()
7676
$resultRedirect->setPath('sales/*/');
7777
} catch (\Exception $e) {
7878
$this->messageManager->addExceptionMessage($e, __('Order saving error: %1', $e->getMessage()));
79+
$resultRedirect->setPath('sales/*/');
7980
}
81+
8082
return $resultRedirect;
8183
}
8284
}

app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance/Save.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Widget\Controller\Adminhtml\Widget\Instance;
87

8+
use Magento\Framework\Exception\NotFoundException;
9+
910
class Save extends \Magento\Widget\Controller\Adminhtml\Widget\Instance
1011
{
1112
/**
1213
* Save action
1314
*
1415
* @return void
16+
* @throws NotFoundException
1517
*/
1618
public function execute()
1719
{
20+
if (!$this->getRequest()->isPost()) {
21+
throw new NotFoundException(__('Page not found.'));
22+
}
23+
1824
$widgetInstance = $this->_initWidgetInstance();
19-
if (!$this->getRequest()->isPost() || !$widgetInstance) {
25+
if (!$widgetInstance) {
2026
$this->_redirect('adminhtml/*/');
2127
return;
2228
}

0 commit comments

Comments
 (0)