]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File_redirection.php
Merge branch 'master' into 1.0.x
[quix0rs-gnu-social.git] / classes / File_redirection.php
index 00ec75309a50d4dba47bbf171df011b225e2360b..6a86197d9378d7abc358815ff32ac62bef1f313a 100644 (file)
@@ -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 {