Skip to content

Commit

Permalink
Ignore XML parsing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mantas-done committed Feb 6, 2024
1 parent da74e3d commit 12c6920
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/Code/Converters/TtmlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function fileContentToInternalFormat($file_content, $original_file_conten
$new_file_content = str_replace("encoding='UTF-16'", "encoding='UTF-8'", $new_file_content);
return (new TtmlConverter())->fileContentToInternalFormat($new_file_content, '');
}
throw new UserException('Invalid XML: ' . trim($errors[0]->message));
// throw new UserException('Invalid XML: ' . trim($errors[0]->message));
}

$fps = self::framesPerSecond($file_content);
Expand Down
4 changes: 0 additions & 4 deletions tests/formats/TtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ public function testParses2()

public function testDuplicatedElementIdsParse()
{
$this->expectException(UserException::class);

$ttml_path = './tests/files/ttml_with_duplicated_element_ids.ttml';
$actual = Subtitles::loadFromFile($ttml_path)->getInternalFormat();
$expected = (new Subtitles())
Expand All @@ -90,8 +88,6 @@ public function testDuplicatedElementIdsParse()

public function testTimeParseWithFpsAndMultiplierGiven()
{
$this->expectException(UserException::class);

$ttml_path = './tests/files/ttml_with_fps_and_multiplier_given.ttml';
$actual = Subtitles::loadFromFile($ttml_path)->getInternalFormat();
$expected = (new Subtitles())
Expand Down

0 comments on commit 12c6920

Please sign in to comment.