-
-
Save chillu/f8bbe0a87f3feab8946d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php | |
index 9cc8c53..b9f8828 100644 | |
--- a/admin/code/LeftAndMain.php | |
+++ b/admin/code/LeftAndMain.php | |
@@ -1413,7 +1413,11 @@ class LeftAndMain extends Controller implements PermissionProvider { | |
$cache = SS_Cache::factory('LeftAndMain_CMSVersion'); | |
$cacheKey = filemtime($composerLockPath); | |
$versions = $cache->load($cacheKey); | |
- if(!$versions) $versions = array(); | |
+ if($versions) { | |
+ $versions = json_decode($versions); | |
+ } else { | |
+ $versions = array(); | |
+ } | |
if(!$versions && $jsonData = file_get_contents($composerLockPath)) { | |
$lockData = json_decode($jsonData); | |
if($lockData && isset($lockData->packages)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment