return '#/multimedia/' . $read . md5($this->to . '/' . $this->extra . '/' . $this->id);
}
+ /**
+ * @throws \Exception
+ */
public function getAdditionnalContent() {
$res = parent::getAdditionnalContent();
- $dim = Image::getimagesize($this->compiler->working_path($this->to));
+ $path = $this->compiler->working_path($this->to);
+ try {
+ $dim = Image::getimagesize($path);
+ }catch (\Exception $e){
+ throw new \Exception('Invalid image on link ' . $this->uid . ' (page ' . $this->page . ') : '.$e->getMessage());
+ }
if (is_array($dim) && ($this->video_width || $this->video_height)) {
$dim = Resizer::keepRatio($dim[0], $dim[1], $this->video_width, $this->video_height);