Skip to content

Commit

Permalink
catch domexception (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch authored Sep 28, 2020
1 parent b421512 commit 31b88f9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Quotation/FixedQuotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ private function quoteHtml(string $newHtml, string $originalHtml, string $header
if ($removeItems instanceof \DOMNodeList) {
/** @var \DOMElement $removeItem */
foreach ($removeItems as $removeItem) {
/** @var \DOMElement $parent */
$parent = $removeItem->parentNode;
$parent->removeChild($removeItem);
try {
/** @var \DOMElement $parent */
$parent = $removeItem->parentNode;
$parent->removeChild($removeItem);
} catch (\DOMException $e) {
}
}
}

Expand Down

0 comments on commit 31b88f9

Please sign in to comment.