Skip to content

Commit 73ca354

Browse files
author
Jeroen
committed
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 918dd05 commit 73ca354

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
@@ -531,8 +531,8 @@ public function setName($name)
531531
public function getConfig($path)
532532
{
533533
$data = $this->_config->getValue($path, ScopeInterface::SCOPE_STORE, $this->getCode());
534-
if (!$data) {
535-
$data = $this->_config->getValue($path, ScopeConfigInterface::SCOPE_TYPE_DEFAULT);
534+
if ($data === null) {
535+
$data = $this->_config->getValue($path);
536536
}
537537
return $data === false ? null : $data;
538538
}

0 commit comments

Comments
 (0)