Skip to content

Commit

Permalink
fix: added missing checks on SQLite3 installations
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 26, 2021
1 parent fbaedbe commit 89248df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion phpmyfaq/src/phpMyFAQ/Database/Sqlite3.php
Expand Up @@ -230,7 +230,9 @@ public function fetchAssoc($result): array
{
$result->fetchedByPMF = true;

return $result->fetchArray(SQLITE3_ASSOC);
$fetchedData = $result->fetchArray(SQLITE3_ASSOC);

return is_array($fetchedData) ? $fetchedData : [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/User/CurrentUser.php
Expand Up @@ -635,7 +635,7 @@ protected function setSuccess(bool $success): bool
$this->getUserId()
);

return $this->config->getDb()->query($update);
return (bool) $this->config->getDb()->query($update);
}

/**
Expand Down

0 comments on commit 89248df

Please sign in to comment.