diff --git a/app/Services/GalleryManager.php b/app/Services/GalleryManager.php index 2f955f6b3..51574a9bc 100644 --- a/app/Services/GalleryManager.php +++ b/app/Services/GalleryManager.php @@ -424,7 +424,7 @@ public function castVote($action, $submission, $user) { // Get existing vote data if it exists, remove any existing vote data for the user, // add the new vote data, and json encode it - $voteData = (isset($submission->vote_data) ? collect(json_decode($submission->vote_data, true)) : collect([])); + $voteData = (isset($submission->vote_data) ? collect($submission->vote_data, true) : collect([])); $voteData->get($user->id) ? $voteData->pull($user->id) : null; $voteData->put($user->id, $vote); $submission->vote_data = $voteData->toJson();