MDL-76953 mod: deprecate libxml library method wrappers.

The `libxml_disable_entity_loader` method is deprecated since PHP8.0,
which is our minimum required version so we no longer need to support
calls to it using the current wrappers.
This commit is contained in:
Paul Holden 2023-06-16 15:11:39 +01:00
parent 1b1a15a308
commit 436a279dec
No known key found for this signature in database
GPG key ID: A81A96D6045F6164
5 changed files with 14 additions and 15 deletions

View file

@ -70,13 +70,10 @@ if ($consumerkey === false) {
}
// TODO MDL-46023 Replace this code with a call to the new library.
$origentity = lti_libxml_disable_entity_loader(true);
$xml = simplexml_load_string($rawbody);
if (!$xml) {
lti_libxml_disable_entity_loader($origentity);
throw new Exception('Invalid XML content');
}
lti_libxml_disable_entity_loader($origentity);
$body = $xml->imsx_POXBody;
foreach ($body->children() as $child) {