summaryrefslogtreecommitdiff
path: root/classes/File.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-25 11:10:34 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-25 11:10:34 -0700
commit638905c270824b3c0e673ae9872937c06fbd862e (patch)
tree8d5d126f040315f5497a86101285e89e18371059 /classes/File.php
parent09010c4c2b80bb94607e2946fa94bca5ff160fed (diff)
avoid getting duplicate errors on upload
Diffstat (limited to 'classes/File.php')
-rw-r--r--classes/File.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/File.php b/classes/File.php
index b98c9e665..5dd7cd865 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -91,9 +91,10 @@ class File extends Memcached_DataObject
$given_url = File_redirection::_canonUrl($given_url);
if (empty($given_url)) return -1; // error, no url to process
$file = File::staticGet('url', $given_url);
- if (empty($file->id)) {
+ if (empty($file)) {
$file_redir = File_redirection::staticGet('url', $given_url);
- if (empty($file_redir->id)) {
+ if (empty($file_redir)) {
+ common_debug("processNew() '$given_url' not a known redirect.\n");
$redir_data = File_redirection::where($given_url);
$redir_url = $redir_data['url'];
if ($redir_url === $given_url) {