File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ protected function getMediaTypeByFilePath(string $filepath): MediaType
23
23
$ info = @getimagesize ($ filepath );
24
24
25
25
if (!is_array ($ info )) {
26
- throw new DecoderException ('Unable to decode input ' );
26
+ throw new DecoderException ('Unable to detect media (MIME) from data in file path. ' );
27
27
}
28
28
29
29
if (!array_key_exists ('mime ' , $ info )) {
30
- throw new DecoderException ('Unable to decode input ' );
30
+ throw new DecoderException ('Unable to detect media (MIME) from data in file path. ' );
31
31
}
32
32
33
33
return MediaType::from ($ info ['mime ' ]);
@@ -45,11 +45,11 @@ protected function getMediaTypeByBinary(string $data): MediaType
45
45
$ info = @getimagesizefromstring ($ data );
46
46
47
47
if (!is_array ($ info )) {
48
- throw new DecoderException ('Unable to decode input ' );
48
+ throw new DecoderException ('Unable to detect media (MIME) from binary data. ' );
49
49
}
50
50
51
51
if (!array_key_exists ('mime ' , $ info )) {
52
- throw new DecoderException ('Unable to decode input ' );
52
+ throw new DecoderException ('Unable to detect media (MIME) from binary data. ' );
53
53
}
54
54
55
55
return MediaType::from ($ info ['mime ' ]);
You can’t perform that action at this time.
0 commit comments