From 52d25192af80f349777594ddaddce95d7c097073 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 7 Mar 2016 17:22:20 +0200 Subject: [PATCH 1/2] Added warning if cache isn't set --- app/Libraries/Utils.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index fbe1cb6a1c..fcb210b0d7 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -281,7 +281,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; }); From 409973758cfd0ed167471704c8b5585904ed3829 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 7 Mar 2016 17:34:28 +0200 Subject: [PATCH 2/2] Bumped version to 2.5.0.4 --- app/Http/routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index 7ce979cfb0..b2237acdd3 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -511,7 +511,7 @@ if (!defined('CONTACT_EMAIL')) { define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG'); define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com'); - define('NINJA_VERSION', '2.5.0.3'); + define('NINJA_VERSION', '2.5.0.4'); define('NINJA_DATE', '2000-01-01'); define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja');