Skip to content

Commit 6180e29

Browse files
author
Jeroen
authored
Update Store getConfig() to respect valid false return value
Using a config setting Yes/No will return string '0' when No is saved. Method will therefore fetch default config value because '0' equals false.
1 parent 2b78994 commit 6180e29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ public function setName($name)
535535
public function getConfig($path)
536536
{
537537
$data = $this->_config->getValue($path, ScopeInterface::SCOPE_STORE, $this->getCode());
538-
if (!$data) {
539-
$data = $this->_config->getValue($path, ScopeConfigInterface::SCOPE_TYPE_DEFAULT);
538+
if ($data === null) {
539+
$data = $this->_config->getValue($path);
540540
}
541541
return $data === false ? null : $data;
542542
}

0 commit comments

Comments
 (0)