diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-01-14 23:07:34 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-01-14 23:07:34 +0100 |
commit | 0d154365a23678c138cadad31f746aa27ac3f96a (patch) | |
tree | 059a22951a20bd85e2acfbda68fee8899bed0fe0 /includes/model/EventConfig_model.php | |
parent | 646ffc19107999a1cdcd1c897fbb6d28d520bb13 (diff) |
models: return null on empty result
Diffstat (limited to 'includes/model/EventConfig_model.php')
-rw-r--r-- | includes/model/EventConfig_model.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/model/EventConfig_model.php b/includes/model/EventConfig_model.php index 6d782ec4..766a5849 100644 --- a/includes/model/EventConfig_model.php +++ b/includes/model/EventConfig_model.php @@ -5,11 +5,13 @@ use Engelsystem\Database\DB; /** * Get event config. * - * @return array + * @return array|null */ function EventConfig() { - return DB::selectOne('SELECT * FROM `EventConfig` LIMIT 1'); + $config = DB::selectOne('SELECT * FROM `EventConfig` LIMIT 1'); + + return empty($config) ? null : $config; } /** |