Skip to content

Commit 6c3adec

Browse files
Merge pull request #86 from brianfreytag/image_size
Re-run getimagesize without source_info if false
2 parents 0496393 + 5bc420b commit 6c3adec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
vendor
3+
composer.lock

lib/ImageResize.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ public function __construct($filename)
7777
throw new ImageResizeException('Unsupported file type');
7878
}
7979

80-
$image_info = getimagesize($filename,$this->source_info);
80+
if (!$image_info = getimagesize($filename, $this->source_info)) {
81+
$image_info = getimagesize($filename);
82+
}
8183

8284
if (!$image_info) {
8385
throw new ImageResizeException('Could not read file');

0 commit comments

Comments
 (0)