From 5a72a259053a412c0072d1ba7195de64c1c1175a Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Tue, 30 Sep 2014 13:10:43 +0200 Subject: [PATCH] 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 --- lib/mediafile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;