diff options
Diffstat (limited to 'src/Database/Db.php')
-rw-r--r-- | src/Database/Db.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Database/Db.php b/src/Database/Db.php index f34d1564..c0871e68 100644 --- a/src/Database/Db.php +++ b/src/Database/Db.php @@ -45,14 +45,19 @@ class Db * * @param string $query * @param array $bindings - * @return array + * @return array|null */ public static function selectOne($query, array $bindings = []) { $result = self::connection()->selectOne($query, $bindings); // @TODO: remove typecast - return (array)$result; + $result = (array)$result; + if (empty($result)) { + return null; + } + + return $result; } /** |