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
This commit is contained in:
Hannes Mannerheim 2014-09-30 13:10:43 +02:00
parent c2998e26ec
commit 5a72a25905
1 changed files with 1 additions and 1 deletions

View 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;