Skip to content

Commit ebcb30c

Browse files
Merge pull request #60 from PetrSchegolskov/feature-1
Add Exception 'Could not get image'
2 parents 4dee915 + fe1e55b commit ebcb30c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ImageResize.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public function __construct($filename)
9696
throw new \Exception('Unsupported image type');
9797
break;
9898
}
99+
100+
if (!$this->source_image) {
101+
throw new \Exception('Could not load image');
102+
}
99103

100104
return $this->resize($this->getSourceWidth(), $this->getSourceHeight());
101105
}

0 commit comments

Comments
 (0)