diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers/graphics.php | 4 |
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 |