diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-08-04 20:35:13 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-04 20:35:13 -0700 |
commit | b9a6cd45ba0b32a115dedd8b3fa3962eb82202e1 (patch) | |
tree | ff274c9029a93204f006e7bc07f4604ee959541c /modules/server_add/controllers | |
parent | a03b9273b2afc61dfdea43f679e75639238cdcd7 (diff) |
Skip empty files, since we know they're broken. Fixes ticket #610.
Diffstat (limited to 'modules/server_add/controllers')
-rw-r--r-- | modules/server_add/controllers/server_add.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php index f68392ce..bfb96506 100644 --- a/modules/server_add/controllers/server_add.php +++ b/modules/server_add/controllers/server_add.php @@ -150,7 +150,8 @@ class Server_Add_Controller extends Admin_Controller { $queue[] = array($child, $entry->id); } else { $ext = strtolower(pathinfo($child, PATHINFO_EXTENSION)); - if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4"))) { + if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4")) && + filesize($child) > 0) { $child_entry = ORM::factory("server_add_file"); $child_entry->task_id = $task->id; $child_entry->file = $child; |