File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Cms \Controller \Adminhtml \Wysiwyg \Images ;
7
7
8
- use Magento \Framework \App \Filesystem \DirectoryList ;
9
8
use Magento \Framework \App \Action \HttpPostActionInterface ;
9
+ use Magento \Framework \App \Filesystem \DirectoryList ;
10
10
11
11
/**
12
12
* Delete image files.
@@ -62,6 +62,7 @@ public function execute()
62
62
{
63
63
try {
64
64
if (!$ this ->getRequest ()->isPost ()) {
65
+ //phpcs:ignore Magento2.Exceptions.DirectThrow
65
66
throw new \Exception ('Wrong request. ' );
66
67
}
67
68
$ files = $ this ->getRequest ()->getParam ('files ' );
@@ -84,8 +85,9 @@ public function execute()
84
85
$ this ->getStorage ()->deleteFile ($ filePath );
85
86
}
86
87
}
87
-
88
+
88
89
return $ this ->resultRawFactory ->create ();
90
+ // phpcs:ignore Magento2.Exceptions.ThrowCatch
89
91
} catch (\Exception $ e ) {
90
92
$ result = ['error ' => true , 'message ' => $ e ->getMessage ()];
91
93
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
You can’t perform that action at this time.
0 commit comments