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 55 */
66namespace Magento \Cms \Controller \Adminhtml \Wysiwyg \Images ;
77
8- use Magento \Framework \App \Filesystem \DirectoryList ;
98use Magento \Framework \App \Action \HttpPostActionInterface ;
9+ use Magento \Framework \App \Filesystem \DirectoryList ;
1010
1111/**
1212 * Delete image files.
@@ -62,6 +62,7 @@ public function execute()
6262 {
6363 try {
6464 if (!$ this ->getRequest ()->isPost ()) {
65+ //phpcs:ignore Magento2.Exceptions.DirectThrow
6566 throw new \Exception ('Wrong request. ' );
6667 }
6768 $ files = $ this ->getRequest ()->getParam ('files ' );
@@ -84,8 +85,9 @@ public function execute()
8485 $ this ->getStorage ()->deleteFile ($ filePath );
8586 }
8687 }
87-
88+
8889 return $ this ->resultRawFactory ->create ();
90+ // phpcs:ignore Magento2.Exceptions.ThrowCatch
8991 } catch (\Exception $ e ) {
9092 $ result = ['error ' => true , 'message ' => $ e ->getMessage ()];
9193 /** @var \Magento\Framework\Controller\Result\Json $resultJson */
You can’t perform that action at this time.
0 commit comments