Backend for songs.zachdecook.com
Diffstat (limited to 'laravel/app/Song.php')
| -rw-r--r-- | laravel/app/Song.php | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |