Commit c2ec7229 authored by Karamel's avatar Karamel
Browse files

Remove already handled notice and warning on image thumbnailing

parent 820e3d72
......@@ -51,7 +51,10 @@ class Thumbnailer
* @return An Image with mimeType and image set. False on failure. */
public function thumbnail($data) {
$result = new Image();
$imgData = getimagesizefromstring($data);
$imgData = @getimagesizefromstring($data);
if ($imgData === false) {
return false;
}
$imgWidth = $imgData[0];
$imgHeight = $imgData[1];
$ratio = 1;
......@@ -66,7 +69,7 @@ class Thumbnailer
$destWidth = round($imgWidth * $ratio);
$destHeight = round($imgHeight * $ratio);
// Read input
$src = imagecreatefromstring($data);
$src = @imagecreatefromstring($data);
if ($src === false) {
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment