Skip to content

Commit 8aedc51

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Fix typo Fix deprecated libxml_disable_entity_loader Add Tagalog translations for validator messages 94, 95, 96 and 99 PHPUnit's assertContains() performs strict comparisons now. [ClassLoader][Routing] Fix namespace parsing on php 8. Fix deprecated libxml_disable_entity_loader Made reference to PHPUnit\Util\XML::loadfile php5-compatible. [Validator] Add missing translations for german and vietnamese Modernized deprecated PHPUnit assertion calls [Console] The message of "class not found" errors has changed in php 8. The PHPUnit\Util\XML class has been removed in PHPUnit 9.3. [Console] Make sure we pass a numeric array of arguments to call_user_func_array(). [Serializer] Fix that it will never reach DOMNode [Validator] sync translations [VarDumper] Improve previous fix on light array coloration [Cache] Fix #37667
2 parents a96aecb + f8367eb commit 8aedc51

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Crawler.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
223223
}
224224

225225
$internalErrors = libxml_use_internal_errors(true);
226-
$disableEntities = libxml_disable_entity_loader(true);
226+
if (LIBXML_VERSION < 20900) {
227+
$disableEntities = libxml_disable_entity_loader(true);
228+
}
227229

228230
$dom = new \DOMDocument('1.0', $charset);
229231
$dom->validateOnParse = true;
@@ -233,7 +235,9 @@ public function addXmlContent(string $content, string $charset = 'UTF-8', int $o
233235
}
234236

235237
libxml_use_internal_errors($internalErrors);
236-
libxml_disable_entity_loader($disableEntities);
238+
if (LIBXML_VERSION < 20900) {
239+
libxml_disable_entity_loader($disableEntities);
240+
}
237241

238242
$this->addDocument($dom);
239243

@@ -1119,7 +1123,9 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
11191123
$htmlContent = $this->convertToHtmlEntities($htmlContent, $charset);
11201124

11211125
$internalErrors = libxml_use_internal_errors(true);
1122-
$disableEntities = libxml_disable_entity_loader(true);
1126+
if (LIBXML_VERSION < 20900) {
1127+
$disableEntities = libxml_disable_entity_loader(true);
1128+
}
11231129

11241130
$dom = new \DOMDocument('1.0', $charset);
11251131
$dom->validateOnParse = true;
@@ -1129,7 +1135,9 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO
11291135
}
11301136

11311137
libxml_use_internal_errors($internalErrors);
1132-
libxml_disable_entity_loader($disableEntities);
1138+
if (LIBXML_VERSION < 20900) {
1139+
libxml_disable_entity_loader($disableEntities);
1140+
}
11331141

11341142
return $dom;
11351143
}

0 commit comments

Comments
 (0)