fix data selection

This commit is contained in:
ghost 2021-08-08 13:54:40 +03:00
parent 808b11fb7d
commit 3e7beba89c

View File

@ -35,7 +35,9 @@ class SQLite {
$query->execute([$namehash]);
return $query->rowCount() ? $query->fetch()['value'] : [];
$result = $query->fetch();
return $result ? $result['value'] : false;
} catch(PDOException $e) {
@ -147,8 +149,9 @@ class SQLite {
$query->execute();
}
$result = $query->fetchAll();
return $query->rowCount() ? $query->fetchAll() : [];
return $result ? $result : [];
} catch(PDOException $e) {