From a808459bb6567d34b55349968bfc7c11ec4b417e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 16 Jul 2025 18:05:01 +0200 Subject: [PATCH] wait #7644 @2.5 --- src/Links/Link.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Links/Link.php b/src/Links/Link.php index f371a64..9b96248 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -181,6 +181,7 @@ class Link */ public static function getInstance($id, $init, &$compiler) { + $init = ArrayUtil::asArray($init); static::normalizeDimensions($init); @@ -212,6 +213,7 @@ class Link $init['inline'] = 'background_texts'; return new VideoBackgroundLink($id, $init, $compiler); } + break; case static::CUSTOM: return CustomLink::getCustomInstance($id, $init, $compiler); case static::WEBVIDEO: @@ -468,12 +470,11 @@ class Link public static function getMultimediaInstance($id, $init, &$compiler) { + if ($init['to'] == '') { return null; } $init['inline'] = self::normalizeInlineIntegration($init['inline'] ?? ''); - - $ext = mb_strtolower(Files::getExtension($init['to'])); if (in_array($ext, array('oam', 'zip', 'html')) || substr($init['to'], 0, 4) == 'http') { @@ -906,7 +907,13 @@ class Link if (!is_numeric($this->page)) { return false; } - return $this->top + $this->height <= 0 || $this->top > $this->compiler->getHeightForLinks($this->page) || $this->left > $this->compiler->getWidthForLinks($this->page) || $this->left + $this->width <= 0;; + if ($this->width === '' || $this->height === '') { + return false; + } + return ($this->top + $this->height) <= 0 || + ($this->left + $this->width <= 0) || + $this->top > $this->compiler->getHeightForLinks($this->page) || + $this->left > $this->compiler->getWidthForLinks($this->page); } public function ignore() -- 2.39.5