]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Bug, attachments stored double in file table
authorHannes Mannerheim <h@nnesmannerhe.im>
Tue, 30 Sep 2014 11:10:43 +0000 (13:10 +0200)
committerHannes Mannerheim <h@nnesmannerhe.im>
Tue, 30 Sep 2014 11:10:43 +0000 (13:10 +0200)
This if-statement looked like this before:

if (empty($file_redir))

and so it needs a ! when rewritten as instanceof

lib/mediafile.php

index f44bfae1fa2cc86965c547fb4b84c646642d4842..92a069facf4011af39028e8729c2ba6acaa0cb25 100644 (file)
@@ -132,7 +132,7 @@ class MediaFile
     {
         $file_redir = File_redirection::getKV('url', $url);
 
-        if ($file_redir instanceof File_redirection) {
+        if (!$file_redir instanceof File_redirection) {
             $file_redir = new File_redirection;
             $file_redir->url = $url;
             $file_redir->file_id = $file_id;