Skip to content

Commit 2a515ef

Browse files
Stanislav Idolovjignesh-baldha
authored andcommitted
Small refactoring for better readability
1 parent b95b1a5 commit 2a515ef

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/bootstrap.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,12 @@
5454
&& isset($_SERVER['HTTP_ACCEPT'])
5555
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false
5656
) {
57-
$profilerString = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
57+
$profilerConfig = isset($_SERVER['MAGE_PROFILER']) && strlen($_SERVER['MAGE_PROFILER'])
5858
? $_SERVER['MAGE_PROFILER']
5959
: trim(file_get_contents(BP . '/var/profiler.flag'));
6060

61-
if ($profilerString && $profilerArray = json_decode($profilerString, true)) {
62-
$profilerConfig = $profilerArray;
63-
} else {
64-
$profilerConfig = $profilerString;
61+
if ($profilerConfig) {
62+
$profilerConfig = json_decode($profilerConfig, true) ?: $profilerConfig;
6563
}
6664

6765
Magento\Framework\Profiler::applyConfig(

0 commit comments

Comments
 (0)