diff options
Diffstat (limited to 'app/Models/DatabaseDAOSQLite.php')
| -rw-r--r-- | app/Models/DatabaseDAOSQLite.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php index f59f6c9ae..c425135b5 100644 --- a/app/Models/DatabaseDAOSQLite.php +++ b/app/Models/DatabaseDAOSQLite.php @@ -37,10 +37,9 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { public function getSchema(string $table): array { $sql = 'PRAGMA table_info(' . $table . ')'; $stm = $this->pdo->query($sql); - if ($stm !== false) { - $res = $stm->fetchAll(PDO::FETCH_ASSOC); + if ($stm !== false && ($res = $stm->fetchAll(PDO::FETCH_ASSOC)) !== false) { /** @var list<array{name:string,type:string,notnull:bool,dflt_value:string|int|bool|null}> $res */ - return $this->listDaoToSchema($res ?: []); + return $this->listDaoToSchema($res); } return []; } |
