]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/usefileasthumbnailexception.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / usefileasthumbnailexception.php
index cafbe692b284081fb64683228529d21ee7f8001e..5ad33cb0a9c1565b627cf9633ee981f38fed8671 100644 (file)
@@ -34,13 +34,9 @@ class UseFileAsThumbnailException extends UnsupportedMediaException
 {
     public $file = null;
 
-    public function __construct($file_id)
+    public function __construct(File $file)
     {
-        $this->file = File::getKV('id', $file_id);
-        if (!$this->file instanceof File) {
-            throw new ServerException('No File ID supplied to exception');
-        }
-
+        $this->file = $file;
         parent::__construct('Thumbnail not generated', $this->file->getPath());
     }
 }