Skip to content

Commit f3ed122

Browse files
committed
11882: It's not possible to enable "log to file" (debugging) in production mode. Psr logger debug method does not work by the default in developer mode.
1 parent 9c21788 commit f3ed122

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/code/Magento/Config/Model/Config/Structure/ConcealInProductionConfigList.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,15 @@ public function isHidden($path)
8383
$result = false;
8484
$path = $this->normalizePath($path);
8585
if ($this->state->getMode() === State::MODE_PRODUCTION
86-
&& preg_match('/.+?\/.+?\/.+?/', $path)) {
86+
&& preg_match('/(?<group>(?<section>.*?)\/.*?)\/.*?/', $path, $match)) {
87+
$group = $match['group'];
88+
$section = $match['section'];
8789
$exemptions = array_keys($this->exemptions);
8890
foreach ($this->configs as $configPath => $value) {
8991
if ($this->configs[$configPath] === static::HIDDEN && strpos($path, $configPath) !==false) {
90-
$result = true;
91-
foreach ($exemptions as $exemption) {
92-
if (strpos($path, $exemption) !== false) {
93-
$result = false;
94-
}
95-
}
92+
$result = empty(array_intersect([$section, $group, $path], $exemptions));
9693
}
9794
}
98-
9995
}
10096

10197
return $result;

0 commit comments

Comments
 (0)