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); + } } }