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