Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Solved json obj to array issue

  • Loading branch information...
commit f033321adcaaf4e2306b5b1e2f9915054f7d9ec3 1 parent 600d9cf
g4b0 authored chillu committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 admin/code/LeftAndMain.php
View
8 admin/code/LeftAndMain.php
@@ -1378,7 +1378,11 @@ public function CMSVersion() {
$cache = SS_Cache::factory('LeftAndMain_CMSVersion');
$cacheKey = filemtime($composerLockPath);
$versions = $cache->load($cacheKey);
- if(!$versions) $versions = array();
+ if($versions) {
+ $versions = json_decode($versions, true);
+ } else {
+ $versions = array();
+ }
if(!$versions && $jsonData = file_get_contents($composerLockPath)) {
$lockData = json_decode($jsonData);
if($lockData && isset($lockData->packages)) {
@@ -1394,7 +1398,7 @@ public function CMSVersion() {
}
}
}
-
+
// Fall back to static version file
foreach($modules as $moduleName => $moduleSpec) {
if(!isset($versions[$moduleName])) {
Please sign in to comment.
Something went wrong with that request. Please try again.