Skip to content

Commit ab4b299

Browse files
committed
Remove code for old libxml versions
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent aee7c6a commit ab4b299

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Crawler.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
229229
}
230230

231231
$internalErrors = libxml_use_internal_errors(true);
232-
if (\LIBXML_VERSION < 20900) {
233-
$disableEntities = libxml_disable_entity_loader(true);
234-
}
235232

236233
$dom = new \DOMDocument('1.0', $charset);
237234
$dom->validateOnParse = true;
@@ -241,9 +238,6 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
241238
}
242239

243240
libxml_use_internal_errors($internalErrors);
244-
if (\LIBXML_VERSION < 20900) {
245-
libxml_disable_entity_loader($disableEntities);
246-
}
247241

248242
$this->addDocument($dom);
249243

@@ -1131,9 +1125,6 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
11311125
$htmlContent = $this->convertToHtmlEntities($htmlContent, $charset);
11321126

11331127
$internalErrors = libxml_use_internal_errors(true);
1134-
if (\LIBXML_VERSION < 20900) {
1135-
$disableEntities = libxml_disable_entity_loader(true);
1136-
}
11371128

11381129
$dom = new \DOMDocument('1.0', $charset);
11391130
$dom->validateOnParse = true;
@@ -1143,9 +1134,6 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
11431134
}
11441135

11451136
libxml_use_internal_errors($internalErrors);
1146-
if (\LIBXML_VERSION < 20900) {
1147-
libxml_disable_entity_loader($disableEntities);
1148-
}
11491137

11501138
return $dom;
11511139
}

0 commit comments

Comments
 (0)