Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/PHPHtmlParser/Dom/Node/TextNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public function __construct(string $text, $removeDoubleSpace = true)
if ($replacedText === false) {
throw new LogicalException('mb_ereg_replace returns false when attempting to clean white space from "' . $text . '".');
}
if ($replacedText === null) {
throw new LogicalException('mb_ereg_replace encountered an invalid encoding for "' . $text . '".');
}
$text = $replacedText;
}

Expand Down