$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')) {
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)) {