summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/graphics.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php
index c0ef98db..b409de47 100644
--- a/core/helpers/graphics.php
+++ b/core/helpers/graphics.php
@@ -153,6 +153,10 @@ class graphics_Core {
self::init_toolkit();
}
+ if (filesize($input_file) == 0) {
+ throw new Exception("@todo MALFORMED_INPUT_FILE");
+ }
+
$dims = getimagesize($input_file);
if (max($dims[0], $dims[1]) < min($options["width"], $options["height"])) {
// Image would get upscaled; do nothing