summaryrefslogtreecommitdiff
path: root/classes/File_redirection.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/File_redirection.php')
-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 00ec75309..6a86197d9 100644
--- a/classes/File_redirection.php
+++ b/classes/File_redirection.php
@@ -240,6 +240,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 {