File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
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
- $ profilerFlag = isset ($ _SERVER ['MAGE_PROFILER ' ]) && strlen ($ _SERVER ['MAGE_PROFILER ' ])
57
+ $ profilerConfig = isset ($ _SERVER ['MAGE_PROFILER ' ]) && strlen ($ _SERVER ['MAGE_PROFILER ' ])
58
58
? $ _SERVER ['MAGE_PROFILER ' ]
59
59
: trim (file_get_contents (BP . '/var/profiler.flag ' ));
60
60
61
- \Magento \Framework \Profiler::applyConfig (
62
- $ profilerFlag ,
61
+ if ($ profilerConfig ) {
62
+ $ profilerConfig = json_decode ($ profilerConfig , true ) ?: $ profilerConfig ;
63
+ }
64
+
65
+ Magento \Framework \Profiler::applyConfig (
66
+ $ profilerConfig ,
63
67
BP ,
64
68
!empty ($ _SERVER ['HTTP_X_REQUESTED_WITH ' ]) && $ _SERVER ['HTTP_X_REQUESTED_WITH ' ] == 'XMLHttpRequest '
65
69
);
You can’t perform that action at this time.
0 commit comments