File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -112,12 +112,12 @@ public function getInternalViewURL(Attachment $attachment): ?string
112112 /**
113113 * Returns a URL to a thumbnail of the attachment file.
114114 * For external files the original URL is returned.
115- * @return string|null The URL or null if the attachment file is not existing
115+ * @return string|null The URL or null if the attachment file is not existing or is invalid
116116 */
117117 public function getThumbnailURL (Attachment $ attachment , string $ filter_name = 'thumbnail_sm ' ): ?string
118118 {
119119 if (!$ attachment ->isPicture ()) {
120- throw new InvalidArgumentException ( ' Thumbnail creation only works for picture attachments! ' ) ;
120+ return null ;
121121 }
122122
123123 if (!$ attachment ->hasInternal ()){
You can’t perform that action at this time.
0 commit comments