Skip to content

Commit 0b816c2

Browse files
committed
Merge branch 'get-config-cache' of github.com:freezy-sk/magento2 into 2.4-develop-prs
2 parents d5fb6c3 + ddaac35 commit 0b816c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pub/get.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
if (file_exists($configCacheFile) && is_readable($configCacheFile)) {
5050
$config = json_decode(file_get_contents($configCacheFile), true);
5151

52-
//checking update time
53-
if (filemtime($configCacheFile) + $config['update_time'] > time()) {
52+
// Checking update time
53+
if (isset($config['update_time'], $config['media_directory'], $config['allowed_resources'])
54+
&& filemtime($configCacheFile) + $config['update_time'] > time()
55+
) {
5456
$mediaDirectory = $config['media_directory'];
5557
$allowedResources = $config['allowed_resources'];
5658

0 commit comments

Comments
 (0)