diff --git a/app/Http/Requests/ImageUploadRequest.php b/app/Http/Requests/ImageUploadRequest.php index dd7ba37882..1b0b051366 100644 --- a/app/Http/Requests/ImageUploadRequest.php +++ b/app/Http/Requests/ImageUploadRequest.php @@ -146,7 +146,7 @@ class ImageUploadRequest extends Request } // Remove Current image if exists - if (Storage::disk('public')->exists($path.'/'.$item->{$use_db_field})) { + if (($item->{$use_db_field}!='') && (Storage::disk('public')->exists($path.'/'.$item->{$use_db_field}))) { \Log::debug('A file already exists that we are replacing - we should delete the old one.'); try { Storage::disk('public')->delete($path.'/'.$item->{$use_db_field});