From 6a757d19d28cac957c8827506176ab07efb37d8f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 27 Nov 2023 10:21:11 +0100 Subject: [PATCH] wait #6516 @0.25 --- src/Links/HTMLMultimediaLink.php | 3 +++ src/Links/Link.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Links/HTMLMultimediaLink.php b/src/Links/HTMLMultimediaLink.php index b5298e7..0dfafe5 100644 --- a/src/Links/HTMLMultimediaLink.php +++ b/src/Links/HTMLMultimediaLink.php @@ -42,6 +42,9 @@ class HTMLMultimediaLink extends Link $d = array('fdir' => $fdir, 'dir' => $dir); $this->compiler->getVirtualDirectory()->copy( $this->compiler->working_path($this->to), $d['dir'] . '/' . $this->to); $this->_config = $this->getConfigHTML($d['dir'], $this->to); + if(empty($this->_config)){ + return ''; + } $this->copyExternalFile($d['dir'] . '/' . $this->to); } if (str_starts_with($this->to, 'http')) { diff --git a/src/Links/Link.php b/src/Links/Link.php index c05ddb3..555001b 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -823,8 +823,9 @@ class Link public function getConfigHTML($d, $html) { - if (Files::isNotEmpty($html)) { - $c = file_get_contents($this->compiler->working_path($html)); + $f = $this->compiler->working_path($html); + if (Files::isNotEmpty($f)) { + $c = file_get_contents($f); $res = array('width' => $this->video_width, 'height' => $this->video_height); if (stristr($c, '
')) { if (preg_match('/var animationData = (\{.*\})/', $c, $m)) { -- 2.39.5