From 9746d57c8976e75ea7ea308a5588c7ec20412844 Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Tue, 20 May 2025 18:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=99=E5=85=A5=E6=AA=94=E6=A1=88=20?= =?UTF-8?q?=E7=84=A1=E6=AA=94=E6=A1=88=20=E6=9C=83=E5=87=BA=E9=8C=AF=20202?= =?UTF-8?q?50520?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/Admin/ArtistImportData.php | 8 +++++--- app/Livewire/Admin/BranchImportData.php | 8 +++++--- app/Livewire/Admin/SongImportData.php | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/Livewire/Admin/ArtistImportData.php b/app/Livewire/Admin/ArtistImportData.php index 492238b..f645497 100644 --- a/app/Livewire/Admin/ArtistImportData.php +++ b/app/Livewire/Admin/ArtistImportData.php @@ -67,9 +67,11 @@ class ArtistImportData extends Component } protected function deleteTmpFile() { - $Path = $this->file->getRealPath(); - if ($Path && File::exists($Path)) { - File::delete($Path); + if($this->file!=null){ + $Path = $this->file->getRealPath(); + if ($Path && File::exists($Path)) { + File::delete($Path); + } } } diff --git a/app/Livewire/Admin/BranchImportData.php b/app/Livewire/Admin/BranchImportData.php index 0cf5827..ed47a83 100644 --- a/app/Livewire/Admin/BranchImportData.php +++ b/app/Livewire/Admin/BranchImportData.php @@ -67,9 +67,11 @@ class BranchImportData extends Component } protected function deleteTmpFile() { - $Path = $this->file->getRealPath(); - if ($Path && File::exists($Path)) { - File::delete($Path); + if($this->file!=null){ + $Path = $this->file->getRealPath(); + if ($Path && File::exists($Path)) { + File::delete($Path); + } } } diff --git a/app/Livewire/Admin/SongImportData.php b/app/Livewire/Admin/SongImportData.php index a1a6908..0b9d091 100644 --- a/app/Livewire/Admin/SongImportData.php +++ b/app/Livewire/Admin/SongImportData.php @@ -67,9 +67,11 @@ class SongImportData extends Component } protected function deleteTmpFile() { - $Path = $this->file->getRealPath(); - if ($Path && File::exists($Path)) { - File::delete($Path); + if($this->file!=null){ + $Path = $this->file->getRealPath(); + if ($Path && File::exists($Path)) { + File::delete($Path); + } } }