File_redirection->getFile could never get the file anyway if $redir->file_id was empty...
This commit is contained in:
parent
5af5bb2a32
commit
06b25f384a
@ -126,10 +126,7 @@ class File_oembed extends Managed_DataObject
|
||||
} catch (NoResultException $e) {
|
||||
// File_redirection::where argument 'discover' is false to avoid loops
|
||||
$redir = File_redirection::where($given_url, false);
|
||||
if (empty($redir->file_id)) {
|
||||
$f = $redir->getFile();
|
||||
$file_oembed->mimetype = $f->mimetype;
|
||||
} else {
|
||||
if (!empty($redir->file_id)) {
|
||||
$file_id = $redir->file_id;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user