[PR #2118] [MERGED] fix: allow empty playlist description #2082

Closed
opened 2026-02-26 03:33:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/2118
Author: @Doppelkeks12
Created: 10/6/2025
Status: Merged
Merged: 10/6/2025
Merged by: @phanan

Base: masterHead: fix/emtpy-playlist-description


📝 Commits (1)

  • ef66f13 fix: allow empty playlist description

📊 Changes

3 files changed (+36 additions, -2 deletions)

View changed files

📝 app/Http/Requests/API/Playlist/PlaylistStoreRequest.php (+1 -1)
📝 app/Http/Requests/API/Playlist/PlaylistUpdateRequest.php (+1 -1)
📝 tests/Feature/PlaylistTest.php (+34 -0)

📄 Description

When creating or updating a playlist without a description, I always got the error message: "The description must be a string."
In the network request, I can see that an empty string is sent to the backend.

I'm not a Laravel developer, but I think the ConvertEmptyStringsToNull middleware changes this before validation.

So I could write my own middleware for this, but I chose the simpler way and made the field nullable.
Later on, it will be cast to a string.

So maybe it's more the Laravel way to write a middleware.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/2118 **Author:** [@Doppelkeks12](https://github.com/Doppelkeks12) **Created:** 10/6/2025 **Status:** ✅ Merged **Merged:** 10/6/2025 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `fix/emtpy-playlist-description` --- ### 📝 Commits (1) - [`ef66f13`](https://github.com/koel/koel/commit/ef66f139c28fafaaa4f7fbfa98551e1ceebe4790) fix: allow empty playlist description ### 📊 Changes **3 files changed** (+36 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Requests/API/Playlist/PlaylistStoreRequest.php` (+1 -1) 📝 `app/Http/Requests/API/Playlist/PlaylistUpdateRequest.php` (+1 -1) 📝 `tests/Feature/PlaylistTest.php` (+34 -0) </details> ### 📄 Description When creating or updating a playlist without a description, I always got the error message: "The description must be a string." In the network request, I can see that an empty string is sent to the backend. I'm not a Laravel developer, but I think the ConvertEmptyStringsToNull middleware changes this before validation. So I could write my own middleware for this, but I chose the simpler way and made the field nullable. Later on, it will be cast to a string. So maybe it's more the Laravel way to write a middleware. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:33:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#2082
No description provided.