Skip to content

Commit 8350abf

Browse files
authored
Update Config.php
1 parent a3d2ef9 commit 8350abf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Model/Config.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ public function getBlockFirstImagesToSkip($blockIdentifier): int
111111
public function getBlocksInfo(): array
112112
{
113113
if (null === $this->blocks) {
114+
$this->blocks = [];
115+
114116
try {
115117
$blocks = $this->serializer->unserialize($this->getConfig(self::XML_PATH_LAZY_BLOCKS));
116118
} catch (\InvalidArgumentException $e) {
117-
return [];
119+
return $this->blocks;
118120
}
119121

120122
foreach ($blocks as $blockData) {
@@ -124,8 +126,6 @@ public function getBlocksInfo(): array
124126

125127
$this->blocks[$blockData['block_identifier']] = $blockData['first_images_to_skip'];
126128
}
127-
128-
$this->blocks = null !== $this->blocks ?: [];
129129
}
130130

131131
return $this->blocks;

0 commit comments

Comments
 (0)