1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Prevent an exception from getting thrown in one part of Pageimage where it's preferable for the error not to be fatal

This commit is contained in:
Ryan Cramer
2020-03-13 13:05:34 -04:00
parent ffc7e6fb86
commit 00b89f71b3

View File

@@ -1659,9 +1659,13 @@ class Pageimage extends Pagefile {
$height = 0;
}
$options['webpAdd'] = true;
$original->size($width, $height, $options);
$error = $this->error;
try {
$original->size($width, $height, $options);
} catch(\Exception $e) {
$this->error = ($this->error ? "$this->error - " : "") . $e->getMessage();
}
$error = $this->error;
$event->return = empty($error);
}