From 2935b838f6ac0df438039b5c98ebbf3572db9495 Mon Sep 17 00:00:00 2001 From: Mantas Date: Mon, 28 Aug 2023 12:22:18 +0300 Subject: [PATCH] Fix exception --- src/Code/Converters/TtmlConverter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Code/Converters/TtmlConverter.php b/src/Code/Converters/TtmlConverter.php index 0dcf354..4394c69 100644 --- a/src/Code/Converters/TtmlConverter.php +++ b/src/Code/Converters/TtmlConverter.php @@ -184,6 +184,7 @@ private static function DCSubtitles(string $file_content, $fps) { $xml = simplexml_load_string($file_content); + $internal_format = []; foreach ($xml->Font->Subtitle as $subtitle) { $internal_format[] = array( 'start' => self::ttmlTimeToInternal((string)$subtitle['TimeIn'], $fps), @@ -191,7 +192,7 @@ private static function DCSubtitles(string $file_content, $fps) 'lines' => self::getLinesFromTextWithBr((string)$subtitle->Text->asXML()), ); } -//var_dump($internal_format); exit; + return $internal_format; }