Skip to content

Commit

Permalink
fix minor bug lol
Browse files Browse the repository at this point in the history
  • Loading branch information
kuldp18 committed Apr 5, 2024
1 parent 77b52b1 commit 07ca93b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/video_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
$previous_rating = 0;

// if user rated the video already, fetch previous rating
if (is_video_rated_by_user($pdo, $current_video_id, $current_user_id)) {

if ($current_user_id !== null && is_video_rated_by_user($pdo, $current_video_id, $current_user_id)) {
$previous_rating = fetch_previous_rating_value($pdo, $current_video_id, $current_user_id);
}

Expand Down

0 comments on commit 07ca93b

Please sign in to comment.