mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +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;
|
$height = 0;
|
||||||
}
|
}
|
||||||
$options['webpAdd'] = true;
|
$options['webpAdd'] = true;
|
||||||
$original->size($width, $height, $options);
|
try {
|
||||||
$error = $this->error;
|
$original->size($width, $height, $options);
|
||||||
|
} catch(\Exception $e) {
|
||||||
|
$this->error = ($this->error ? "$this->error - " : "") . $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$error = $this->error;
|
||||||
$event->return = empty($error);
|
$event->return = empty($error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user