From: Hannes Mannerheim Date: Tue, 30 Sep 2014 11:10:43 +0000 (+0200) Subject: Bug, attachments stored double in file table X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5a72a259053a412c0072d1ba7195de64c1c1175a;p=quix0rs-gnu-social.git Bug, attachments stored double in file table This if-statement looked like this before: if (empty($file_redir)) and so it needs a ! when rewritten as instanceof --- diff --git a/lib/mediafile.php b/lib/mediafile.php index f44bfae1fa..92a069facf 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -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;