summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/File_redirection.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/File_redirection.php b/classes/File_redirection.php
index f128b3e07..51b8be3b0 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 {