Forráskód Böngészése

Update ImageOptimizePipeline

Daniel Supernault 6 éve
szülő
commit
8e5bdf6368

+ 3 - 0
app/Jobs/ImageOptimizePipeline/ImageResize.php

@@ -41,6 +41,9 @@ class ImageResize implements ShouldQueue
     public function handle()
     {
         $media = $this->media;
+        if(!$media) {
+            return;
+        }
         $path = storage_path('app/'.$media->media_path);
         if (!is_file($path)) {
             return;

+ 3 - 0
app/Jobs/ImageOptimizePipeline/ImageThumbnail.php

@@ -42,6 +42,9 @@ class ImageThumbnail implements ShouldQueue
     public function handle()
     {
         $media = $this->media;
+        if(!$media) {
+            return;
+        }
         $path = storage_path('app/'.$media->media_path);
         if (!is_file($path)) {
             return;

+ 3 - 0
app/Jobs/ImageOptimizePipeline/ImageUpdate.php

@@ -48,6 +48,9 @@ class ImageUpdate implements ShouldQueue
     public function handle()
     {
         $media = $this->media;
+        if(!$media) {
+            return;
+        }
         $path = storage_path('app/'.$media->media_path);
         $thumb = storage_path('app/'.$media->thumbnail_path);