1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-26 15:24:37 +02:00

Avoid warning (#1313)

This commit is contained in:
Vincent Langlet
2024-03-17 13:38:29 +01:00
committed by GitHub
parent 408d3655c7
commit 77fe8a94fc

View File

@@ -18,7 +18,7 @@ abstract class AbstractDecoder extends GenericAbstractDecoder
*/ */
protected function getMediaTypeByFilePath(string $filepath): string protected function getMediaTypeByFilePath(string $filepath): string
{ {
$info = getimagesize($filepath); $info = @getimagesize($filepath);
if (!is_array($info)) { if (!is_array($info)) {
throw new DecoderException('Unable to decode input'); throw new DecoderException('Unable to decode input');
@@ -40,7 +40,7 @@ abstract class AbstractDecoder extends GenericAbstractDecoder
*/ */
protected function getMediaTypeByBinary(string $data): string protected function getMediaTypeByBinary(string $data): string
{ {
$info = getimagesizefromstring($data); $info = @getimagesizefromstring($data);
if (!is_array($info)) { if (!is_array($info)) {
throw new DecoderException('Unable to decode input'); throw new DecoderException('Unable to decode input');