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

Function libxml_disable_entity_loader() is deprecated in php 8.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.10.1, 3.11, 4.0
    • Fix Version/s: 3.11
    • Component/s: Web Services
    • Labels:

      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

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            Simey Lameze Simey Lameze
            Integrator:
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tester:
            CiBoT CiBoT
            Participants:
            Component watchers:
            Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              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