Commit 2e42d333 authored by Evan Prodromou's avatar Evan Prodromou

check before saving a thumbnail

parent f463329b
......@@ -115,7 +115,13 @@ class File_oembed extends Memcached_DataObject
if (!empty($data->thumbnail_url)) {
File_thumbnail::saveNew($data, $file_id);
$ft = File_thumbnail::staticGet('file_id', $file_id);
if (!empty($ft)) {
common_log(LOG_WARNING, "Strangely, a File_thumbnail object exists for new file $file_id",
} else {
File_thumbnail::saveNew($data, $file_id);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment