File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 54
54
&& isset ($ _SERVER ['HTTP_ACCEPT ' ])
55
55
&& strpos ($ _SERVER ['HTTP_ACCEPT ' ], 'text/html ' ) !== false
56
56
) {
57
- \Magento \Framework \Profiler::applyConfig (
58
- (isset ($ _SERVER ['MAGE_PROFILER ' ]) && strlen ($ _SERVER ['MAGE_PROFILER ' ])) ? $ _SERVER ['MAGE_PROFILER ' ] : trim (file_get_contents (BP . '/var/profiler.flag ' )),
57
+ $ profilerConfig = isset ($ _SERVER ['MAGE_PROFILER ' ]) && strlen ($ _SERVER ['MAGE_PROFILER ' ])
58
+ ? $ _SERVER ['MAGE_PROFILER ' ]
59
+ : trim (file_get_contents (BP . '/var/profiler.flag ' ));
60
+
61
+ if ($ profilerConfig ) {
62
+ $ profilerConfig = json_decode ($ profilerConfig , true ) ?: $ profilerConfig ;
63
+ }
64
+
65
+ Magento \Framework \Profiler::applyConfig (
66
+ $ profilerConfig ,
59
67
BP ,
60
68
!empty ($ _SERVER ['HTTP_X_REQUESTED_WITH ' ]) && $ _SERVER ['HTTP_X_REQUESTED_WITH ' ] == 'XMLHttpRequest '
61
69
);
You can’t perform that action at this time.
0 commit comments