mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-30 16:39:38 +02:00
Solved json obj to array issue
This commit is contained in:
parent
600d9cff53
commit
f033321adc
|
@ -1378,7 +1378,11 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||||
$cache = SS_Cache::factory('LeftAndMain_CMSVersion');
|
$cache = SS_Cache::factory('LeftAndMain_CMSVersion');
|
||||||
$cacheKey = filemtime($composerLockPath);
|
$cacheKey = filemtime($composerLockPath);
|
||||||
$versions = $cache->load($cacheKey);
|
$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)) {
|
if(!$versions && $jsonData = file_get_contents($composerLockPath)) {
|
||||||
$lockData = json_decode($jsonData);
|
$lockData = json_decode($jsonData);
|
||||||
if($lockData && isset($lockData->packages)) {
|
if($lockData && isset($lockData->packages)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user