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:
@@ -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');
|
||||||
|
Reference in New Issue
Block a user