File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/code/Magento/Theme/Controller/Result Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Csp \Api \InlineUtilInterface ;
11
11
use Magento \Framework \App \Config \ScopeConfigInterface ;
12
12
use Magento \Store \Model \ScopeInterface ;
13
- use Magento \Framework \App \Response \ Http ;
13
+ use Magento \Framework \App \ObjectManager ;
14
14
use Magento \Framework \App \Response \HttpInterface as HttpResponseInterface ;
15
15
use Magento \Framework \App \ResponseInterface ;
16
16
use Magento \Framework \View \Result \Layout ;
@@ -34,14 +34,16 @@ class AsyncCssPlugin
34
34
35
35
/**
36
36
* @param ScopeConfigInterface $scopeConfig
37
- * @param InlineUtilInterface $cspInlineUtil
37
+ * @param InlineUtilInterface|null $cspInlineUtil
38
38
*/
39
39
public function __construct (
40
40
ScopeConfigInterface $ scopeConfig ,
41
- InlineUtilInterface $ cspInlineUtil
41
+ InlineUtilInterface $ cspInlineUtil = null
42
42
) {
43
43
$ this ->scopeConfig = $ scopeConfig ;
44
- $ this ->cspInlineUtil = $ cspInlineUtil ;
44
+ $ this ->cspInlineUtil = $ cspInlineUtil ?: ObjectManager::getInstance ()->get (
45
+ InlineUtilInterface::class
46
+ );
45
47
}
46
48
47
49
/**
You can’t perform that action at this time.
0 commit comments