diff options
author | msquare <msquare@notrademark.de> | 2017-07-28 20:11:09 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-07-28 20:11:09 +0200 |
commit | f82e5456d22af7e39a22a9a64e74072cf01e0a31 (patch) | |
tree | c024194bd11621e1956a659a0ec91ee7c747b40c /includes/model/EventConfig_model.php | |
parent | 69a1ee2bfefb43a802dea8cf0f833cbe0a00369c (diff) |
dried code by introducing selectOne for select queries with only one result line expected
Diffstat (limited to 'includes/model/EventConfig_model.php')
-rw-r--r-- | includes/model/EventConfig_model.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/includes/model/EventConfig_model.php b/includes/model/EventConfig_model.php index c5caf4d5..646d19c5 100644 --- a/includes/model/EventConfig_model.php +++ b/includes/model/EventConfig_model.php @@ -9,13 +9,7 @@ use Engelsystem\Database\DB; */ function EventConfig() { - $event_config = DB::select('SELECT * FROM `EventConfig` LIMIT 1'); - - if (empty($event_config)) { - return null; - } - - return array_shift($event_config); + return DB::selectOne('SELECT * FROM `EventConfig` LIMIT 1'); } /** |