]> _ Git - fluidbook_tools.git/commitdiff
wait #6516 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Nov 2023 09:21:11 +0000 (10:21 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Nov 2023 09:21:11 +0000 (10:21 +0100)
src/Links/HTMLMultimediaLink.php
src/Links/Link.php

index b5298e72a6dcdb40b62bb88446d8a396b85c00ba..0dfafe525a757ce2eab5c676fa9b1f617ad04c38 100644 (file)
@@ -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')) {
index c05ddb384abcf24b7882dae792710d7c82a4dcc3..555001b4cb5433a7dee06bf5588aa9544900aacf 100644 (file)
@@ -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, '<div id="lottie"></div>')) {
                 if (preg_match('/var animationData = (\{.*\})/', $c, $m)) {