From b5b0dc2fd788ce2e27bebb14562f2225c0078871 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 20 Apr 2022 17:42:04 +0000 Subject: New song: Supposedly fix creation of new song --- laravel/app/Song.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'laravel/app/Song.php') diff --git a/laravel/app/Song.php b/laravel/app/Song.php index a50a5f0..99b0aa4 100644 --- a/laravel/app/Song.php +++ b/laravel/app/Song.php @@ -43,7 +43,7 @@ class Song extends Model public function setTextAttribute($text) { // Watch out, this saves immediately! - if ($text) { + if ($text && $this->id) { file_put_contents("public/text/{$this->id}.txt", $text); } } -- cgit 1.4.1