Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
private function checkImageSize($path) {
$size = @getimagesize($path);
if (!$size) {
- return true;
+ return false;
}
$width = $size[0];
private function checkImageDataSize($data) {
$size = @getimagesizefromstring($data);
if (!$size) {
- return true;
+ return false;
}
$width = $size[0];
if (!$this->checkImageSize($imagePath)) {
return false;
}
- if (getimagesize($imagePath) !== false) {
+ if (@getimagesize($imagePath) !== false) {
$this->resource = @imagecreatefromjpeg($imagePath);
} else {
$this->logger->debug('OC_Image->loadFromFile, JPG image not valid: ' . $imagePath, ['app' => 'core']);