Skip to content

Commit cd05fe7

Browse files
authored
Add Exception 'Could not get image'
1 parent 4dee915 commit cd05fe7

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 get image');
102+
}
99103

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

0 commit comments

Comments
 (0)