Skip to content

Commit

Permalink
Fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mantas-done committed Aug 28, 2023
1 parent 99c5645 commit 2935b83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Code/Converters/TtmlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,15 @@ 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),
'end' => self::ttmlTimeToInternal((string)$subtitle['TimeOut'], $fps),
'lines' => self::getLinesFromTextWithBr((string)$subtitle->Text->asXML()),
);
}
//var_dump($internal_format); exit;

return $internal_format;
}

Expand Down

0 comments on commit 2935b83

Please sign in to comment.