File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
app/code/Magento/Widget/Controller/Adminhtml/Widget
lib/internal/Magento/Framework/Url Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- *
4
3
* Copyright © Magento, Inc. All rights reserved.
5
4
* See COPYING.txt for license details.
6
5
*/
@@ -13,11 +12,9 @@ class Index extends \Magento\Backend\App\Action implements HttpPostActionInterfa
13
12
/**
14
13
* Authorization level of a basic admin session
15
14
*/
16
- const ADMIN_RESOURCE = 'Magento_Widget::widget_instance ' ;
15
+ public const ADMIN_RESOURCE = 'Magento_Widget::widget_instance ' ;
17
16
18
17
/**
19
- * Core registry
20
- *
21
18
* @var \Magento\Framework\Registry
22
19
*/
23
20
protected $ _coreRegistry ;
@@ -50,11 +47,11 @@ public function __construct(
50
47
public function execute ()
51
48
{
52
49
// save extra params for widgets insertion form
53
- $ skipped = $ this ->getRequest ()->getParam ('skip_widgets ' );
50
+ $ skipped = $ this ->getRequest ()->getParam ('skip_widgets ' , '' );
54
51
$ skipped = $ this ->_widgetConfig ->decodeWidgetsFromQuery ($ skipped );
55
-
56
52
$ this ->_coreRegistry ->register ('skip_widgets ' , $ skipped );
57
53
54
+ // phpcs:ignore Magento2.Legacy.ObsoleteResponse
58
55
$ this ->_view ->loadLayout ('empty ' )->renderLayout ();
59
56
}
60
57
}
Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ public function __construct(
24
24
}
25
25
26
26
/**
27
- * Base64 decode for URL
27
+ * base64_decode() for URLs decoding
28
28
*
29
29
* @param string $url
30
30
* @return string
31
31
*/
32
32
public function decode ($ url )
33
33
{
34
- $ url = $ url !== null ? base64_decode (strtr ($ url , '-_, ' , '+/= ' )) : '' ;
34
+ $ url = base64_decode (strtr ($ url , '-_, ' , '+/= ' ));
35
35
return $ this ->urlBuilder ->sessionUrlVar ($ url );
36
36
}
37
37
}
You can’t perform that action at this time.
0 commit comments