Fixes issue related to PHP 5.5.12
For some reason the closure did not like static calls inside, bye bye array_map(...)
This commit is contained in:
parent
8dd2e97cf7
commit
ca3e13ed33
|
|
@ -105,13 +105,14 @@ class CmsObject extends HalcyonModel implements CmsObjectContract
|
|||
return $instance->get();
|
||||
}
|
||||
|
||||
$result = [];
|
||||
$items = $instance->newQuery()->lists('fileName');
|
||||
|
||||
$items = array_map(function ($item) use ($theme) {
|
||||
return static::loadCached($theme, $item);
|
||||
}, $items);
|
||||
foreach ($items as $item) {
|
||||
$result[] = static::loadCached($theme, $item);
|
||||
}
|
||||
|
||||
return $instance->newCollection($items);
|
||||
return $instance->newCollection($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue