Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70896

Function libxml_disable_entity_loader() is deprecated in php 8.0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.10.1, 3.11, 4.0
    • 3.11
    • Web Services

    Description

      Function libxml_disable_entity_loader() is deprecated in php 8.0

      it's used quite a few times in moodle

      According to https://php.watch/versions/8.0/libxml_disable_entity_loader-deprecation it is no longer needed in PHP 8.0 however still needed in previous versions, they recommend to wrap it like this:

      - libxml_disable_entity_loader(true);
      + if (\PHP_VERSION_ID < 80000) {
      +      libxml_disable_entity_loader(true);
      + }
      

      Maybe we need to create a single wrapper function and remove all usages of it when minimum PHP version is raised to 8?

      Attachments

        Activity

          People

            marina Marina Glancy
            marina Marina Glancy
            Simey Lameze Simey Lameze
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/May/21

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 52 minutes
                2h 52m