diff options
author | Gerardo Zamudio <gerardozamudio@users.noreply.github.com> | 2016-02-24 23:48:50 -0600 |
---|---|---|
committer | Gerardo Zamudio <gerardozamudio@users.noreply.github.com> | 2016-02-24 23:48:50 -0600 |
commit | e4de6b3898b64b26d29aff31f21df5fda8055686 (patch) | |
tree | 575f8a65440f291d70a070d168eafca8c82a6459 /app/Model/Setting.php | |
parent | d9ffbea174ea6524d0a22f8375ca8b3aa04a3c96 (diff) | |
parent | a6540bc604c837d92c9368540c145606723e97f7 (diff) |
Merge pull request #1 from fguillot/master
Update from upstream
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; } /** |