diff --git a/app/Http/Controllers/Components/ComponentsController.php b/app/Http/Controllers/Components/ComponentsController.php index c4d9bcec36..62dc25cf1d 100644 --- a/app/Http/Controllers/Components/ComponentsController.php +++ b/app/Http/Controllers/Components/ComponentsController.php @@ -193,7 +193,7 @@ class ComponentsController extends Controller $this->authorize('delete', $component); // Remove the image if one exists - if (Storage::disk('public')->exists('components/'.$component->image)) { + if ($component->image && Storage::disk('public')->exists('components/' . $component->image)) { try { Storage::disk('public')->delete('components/'.$component->image); } catch (\Exception $e) {