From: Vincent Vanwaelscappel Date: Mon, 27 Nov 2023 09:21:11 +0000 (+0100) Subject: wait #6516 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6a757d19d28cac957c8827506176ab07efb37d8f;p=fluidbook_tools.git wait #6516 @0.25 --- 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)) {