]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageService.php
Added more complexity in an attempt to make ldap host failover fit
[bookstack] / app / Uploads / ImageService.php
index ec2f6da548cc0dbd53e30e696e34c78abc9f6a0e..0199c207ea18927a93d17ed5be5ff75a5f73e7a3 100644 (file)
@@ -315,7 +315,7 @@ class ImageService
     {
         try {
             $thumb = $this->imageTool->make($imageData);
-        } catch (ErrorException|NotSupportedException $e) {
+        } catch (ErrorException | NotSupportedException $e) {
             throw new ImageUploadException(trans('errors.cannot_create_thumbs'));
         }
 
@@ -561,9 +561,10 @@ class ImageService
         }
 
         // Strip thumbnail element from path if existing
-        $originalPathSplit = array_filter(explode('/', $path), function(string $part) {
+        $originalPathSplit = array_filter(explode('/', $path), function (string $part) {
             $resizedDir = (strpos($part, 'thumbs-') === 0 || strpos($part, 'scaled-') === 0);
             $missingExtension = strpos($part, '.') === false;
+
             return !($resizedDir && $missingExtension);
         });