X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FFile_redirection.php;h=68fed77e8bb3eef6402fc0b737676c193cf3b420;hb=b03ece26eb1589c5200094f4d87455ca46db780b;hp=f128b3e07c84179e92369de9b732800da1000d16;hpb=294b290dd95a2e4a09026932a2b066ccee587681;p=quix0rs-gnu-social.git diff --git a/classes/File_redirection.php b/classes/File_redirection.php index f128b3e07c..68fed77e8b 100644 --- a/classes/File_redirection.php +++ b/classes/File_redirection.php @@ -210,6 +210,14 @@ class File_redirection extends Memcached_DataObject } else if (is_string($redir_data)) { // The file is a known redirect target. $file = File::staticGet('url', $redir_data); + if (empty($file)) { + // @fixme should we save a new one? + // this case was triggering sometimes for redirects + // with unresolvable targets; found while fixing + // "can't linkify" bugs with shortened links to + // SSL sites with cert issues. + return null; + } $file_id = $file->id; } } else { @@ -273,4 +281,3 @@ class File_redirection extends Memcached_DataObject $file_redir->insert(); } } -