summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/photo.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-07 17:48:42 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-07 17:48:42 -0700
commitc7aafef85279114a8ae8855647394bb26400b3de (patch)
tree5bb9220fce9901e46e15f5609420a312e4f097a4 /modules/gallery/helpers/photo.php
parentb179b106c2b4d3971498f513ffc71eff1b6b1a5d (diff)
Improve error handling support for corrupt images and report them
appropriately in g2_import.
Diffstat (limited to 'modules/gallery/helpers/photo.php')
-rw-r--r--modules/gallery/helpers/photo.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php
index c1c005f5..a4bc853b 100644
--- a/modules/gallery/helpers/photo.php
+++ b/modules/gallery/helpers/photo.php
@@ -53,6 +53,10 @@ class photo_Core {
throw new Exception("@todo NAME_CANNOT_END_IN_PERIOD");
}
+ if (filesize($filename) == 0) {
+ throw new Exception("@todo EMPTY_INPUT_FILE");
+ }
+
$image_info = getimagesize($filename);
// Force an extension onto the name