ReportQueries.php: fix return type

This commit is contained in:
Zankaria 2024-12-08 18:12:14 +01:00
parent b04cbdc4b7
commit 7fed118b1d

View file

@ -142,7 +142,7 @@ class ReportQueries {
* @param int $id The id of the report to fetch. * @param int $id The id of the report to fetch.
* @return ?array An array of the given report with the `board` and `ip` fields. Null if no such report exists. * @return ?array An array of the given report with the `board` and `ip` fields. Null if no such report exists.
*/ */
public function getReportById(int $id): array { public function getReportById(int $id): ?array {
$query = prepare('SELECT `board`, `ip` FROM ``reports`` WHERE `id` = :id'); $query = prepare('SELECT `board`, `ip` FROM ``reports`` WHERE `id` = :id');
$query->bindValue(':id', $id); $query->bindValue(':id', $id);
$query->execute(); $query->execute();