Skip to content

Commit ebc410f

Browse files
author
Igor Miniailo
committed
Fixed MAGETWO-44938: Products aren't shown on frontend
1 parent d97c3f1 commit ebc410f

File tree

1 file changed

+11
-6
lines changed
  • lib/internal/Magento/Framework/Config

1 file changed

+11
-6
lines changed

lib/internal/Magento/Framework/Config/View.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
*/
7272
public function getVars($module)
7373
{
74-
$this->setData();
74+
$this->initData();
7575
return isset($this->data['vars'][$module]) ? $this->data['vars'][$module] : [];
7676
}
7777

@@ -84,7 +84,7 @@ public function getVars($module)
8484
*/
8585
public function getVarValue($module, $var)
8686
{
87-
$this->setData();
87+
$this->initData();
8888
if (!isset($this->data['vars'][$module])) {
8989
return false;
9090
}
@@ -110,7 +110,7 @@ public function getVarValue($module, $var)
110110
*/
111111
public function getMediaEntities($module, $mediaType)
112112
{
113-
$this->setData();
113+
$this->initData();
114114
return isset($this->data['media'][$module][$mediaType]) ? $this->data['media'][$module][$mediaType] : [];
115115
}
116116

@@ -124,7 +124,7 @@ public function getMediaEntities($module, $mediaType)
124124
*/
125125
public function getMediaAttributes($module, $mediaType, $mediaId)
126126
{
127-
$this->setData();
127+
$this->initData();
128128
return isset($this->data['media'][$module][$mediaType][$mediaId])
129129
? $this->data['media'][$module][$mediaType][$mediaId]
130130
: [];
@@ -195,11 +195,16 @@ public function getExcludedDir()
195195
*/
196196
protected function getItems()
197197
{
198-
$this->setData();
198+
$this->initData();
199199
return isset($this->data['exclude']) ? $this->data['exclude'] : [];
200200
}
201201

202-
protected function setData()
202+
/**
203+
* Initialize data array
204+
*
205+
* @return void
206+
*/
207+
protected function initData()
203208
{
204209
if ($this->data === null) {
205210
$this->data = $this->read();

0 commit comments

Comments
 (0)