Skip to content
Permalink
Browse files

Image: muted warnings

  • Loading branch information
dg committed Nov 28, 2019
1 parent dfc4b76 commit c227724d91754a40d93ff7e7592c83fe074dbdc6
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Utils/Image.php
@@ -552,21 +552,21 @@ private function output(int $type, ?int $quality, string $file = null): void
switch ($type) {
case self::JPEG:
$quality = $quality === null ? 85 : max(0, min(100, $quality));
$success = imagejpeg($this->image, $file, $quality);
$success = @imagejpeg($this->image, $file, $quality); // @ is escalated to exception
break;
case self::PNG:
$quality = $quality === null ? 9 : max(0, min(9, $quality));
$success = imagepng($this->image, $file, $quality);
$success = @imagepng($this->image, $file, $quality); // @ is escalated to exception
break;
case self::GIF:
$success = imagegif($this->image, $file);
$success = @imagegif($this->image, $file); // @ is escalated to exception
break;
case self::WEBP:
$quality = $quality === null ? 80 : max(0, min(100, $quality));
$success = imagewebp($this->image, $file, $quality);
$success = @imagewebp($this->image, $file, $quality); // @ is escalated to exception
break;
default:

0 comments on commit c227724

Please sign in to comment.
You can’t perform that action at this time.