mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 02:04:30 -04:00
Added warning if cache isn't set
This commit is contained in:
parent
93d9d38286
commit
a36626843d
@ -274,7 +274,14 @@ class Utils
|
||||
}
|
||||
|
||||
public static function getFromCache($id, $type) {
|
||||
$data = Cache::get($type)->filter(function($item) use ($id) {
|
||||
$cache = Cache::get($type);
|
||||
|
||||
if ( ! $cache) {
|
||||
static::logError("Cache for {$type} is not set");
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = $cache->filter(function($item) use ($id) {
|
||||
return $item->id == $id;
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user