From 9e24bb2ef08b86c6d1aa150fda5a05538f4882da Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 14 Jan 2016 21:42:28 -0500 Subject: Do not cache app settings in session --- app/Model/Setting.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/Model/Setting.php') diff --git a/app/Model/Setting.php b/app/Model/Setting.php index 3507d424..44e6c065 100644 --- a/app/Model/Setting.php +++ b/app/Model/Setting.php @@ -47,10 +47,12 @@ abstract class Setting extends Base */ public function getOption($name, $default = '') { - return $this->db + $value = $this->db ->table(self::TABLE) ->eq('option', $name) - ->findOneColumn('value') ?: $default; + ->findOneColumn('value'); + + return $value === null || $value === false || $value === '' ? $default : $value; } /** -- cgit v1.2.3