From dd2ce4364c84361fec60b7d583cb1b01eac463a4 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 3 Feb 2013 17:42:31 +0100 Subject: [PATCH] minor changes --- src/Intervention/Image/Image.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Intervention/Image/Image.php b/src/Intervention/Image/Image.php index be46f561..4fb69f5d 100644 --- a/src/Intervention/Image/Image.php +++ b/src/Intervention/Image/Image.php @@ -90,8 +90,12 @@ class Image */ private function setProperties($path, $width = null, $height = null) { - if ( ! is_null($path) && $this->filesystem->exists($path)) { + if ( ! is_null($path)) { + if (!$this->filesystem->exists($path)) { + throw new Exception("Image file ({$path}) not found"); + } + // set file info $info = pathinfo($path); $this->dirname = $info['dirname']; @@ -646,14 +650,6 @@ class Image } } - /* - public function render($type = 'jpg') - { - return Response::make($this->data($type), 200, - array('content-type' => $this->filesystem->mime($type))); - } - */ - /** * Return filesystem object *