diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-14 21:42:28 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-14 21:42:28 -0500 |
commit | 9e24bb2ef08b86c6d1aa150fda5a05538f4882da (patch) | |
tree | 88c5e575d58680359dca293c7971292cf08b0626 /app/Model/Setting.php | |
parent | a8f404421f3e404ccd285da861a8cb25f3642f31 (diff) |
Do not cache app settings in session
Diffstat (limited to 'app/Model/Setting.php')
-rw-r--r-- | app/Model/Setting.php | 6 |
1 files changed, 4 insertions, 2 deletions
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; } /** |