diff options
-rw-r--r-- | classes/File.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php index 959301eda..b2c510340 100644 --- a/classes/File.php +++ b/classes/File.php @@ -95,7 +95,8 @@ class File extends Memcached_DataObject if (empty($file_redir)) { $redir_data = File_redirection::where($given_url); $redir_url = $redir_data['url']; - if ($redir_url === $given_url) { + // TODO: max field length + if ($redir_url === $given_url || strlen($redir_url) > 255) { $x = File::saveNew($redir_data, $given_url); $file_id = $x->id; } else { |