Skip to content

Commit

Permalink
#20 fixed exception on unused id
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik518 committed Jun 21, 2023
1 parent 926e2ff commit 1aaa9c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/src/database/MySQLSongReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function getSongById(int $id): array | false
$sql->execute();
$result = $sql->fetch(PDO::FETCH_ASSOC);

if(!$result) {
return [];
}

return $result;
}
}

0 comments on commit 1aaa9c5

Please sign in to comment.