We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b95b1a5 commit 2a515efCopy full SHA for 2a515ef
app/bootstrap.php
@@ -54,14 +54,12 @@
54
&& isset($_SERVER['HTTP_ACCEPT'])
55
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
56
) {
57
- $profilerString = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
+ $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 ($profilerString && $profilerArray = json_decode($profilerString, true)) {
62
- $profilerConfig = $profilerArray;
63
- } else {
64
- $profilerConfig = $profilerString;
+ if ($profilerConfig) {
+ $profilerConfig = json_decode($profilerConfig, true) ?: $profilerConfig;
65
}
66
67
Magento\Framework\Profiler::applyConfig(
0 commit comments