File tree 1 file changed +8
-11
lines changed
1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -109,25 +109,22 @@ public function __construct($filename)
109
109
110
110
$ finfo = finfo_open (FILEINFO_MIME_TYPE );
111
111
112
-
113
112
if (!$ image_info = getimagesize ($ filename , $ this ->source_info )) {
114
113
$ image_info = getimagesize ($ filename );
115
114
}
116
115
117
- if (!$ checkWebp ) {
118
- if (!$ image_info ) {
119
- if (strstr (finfo_file ($ finfo , $ filename ), 'image ' ) !== false ) {
120
- throw new ImageResizeException ('Unsupported image type ' );
121
- }
122
-
123
- throw new ImageResizeException ('Could not read file ' );
116
+ if (!$ image_info ) {
117
+ if (strstr (finfo_file ($ finfo , $ filename ), 'image ' ) !== false ) {
118
+ throw new ImageResizeException ('Unsupported image type ' );
124
119
}
125
120
126
- $ this ->original_w = $ image_info [0 ];
127
- $ this ->original_h = $ image_info [1 ];
128
- $ this ->source_type = $ image_info [2 ];
121
+ throw new ImageResizeException ('Unsupported file type ' );
129
122
}
130
123
124
+ $ this ->original_w = $ image_info [0 ];
125
+ $ this ->original_h = $ image_info [1 ];
126
+ $ this ->source_type = $ image_info [2 ];
127
+
131
128
switch ($ this ->source_type ) {
132
129
case IMAGETYPE_GIF :
133
130
$ this ->source_image = imagecreatefromgif ($ filename );
You can’t perform that action at this time.
0 commit comments