Skip to content

Commit f17089b

Browse files
authored
Merge pull request #403 from interactiv4/feature/M095M01A-36
feature/M095M01A-36 [MAGENTO 2] Resolve empty cache problem with read…
2 parents 70f6486 + bb6b6a7 commit f17089b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Model/FrontControllerPlugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ private function readMaintenanceIp($ip)
333333
$tag = self::FASTLY_CACHE_MAINTENANCE_IP_FILE_TAG;
334334
$data = json_decode($this->cache->load($tag));
335335
if (empty($data)) {
336+
$data = [];
336337
$flagDir = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
337-
338338
if ($flagDir->isExist('.maintenance.ip')) {
339339
$temp = $flagDir->readFile('.maintenance.ip');
340340
$data = explode(',', trim($temp));

0 commit comments

Comments
 (0)