summaryrefslogtreecommitdiff
path: root/app/Model/Setting.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Setting.php')
-rw-r--r--app/Model/Setting.php6
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;
}
/**