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

Function libxml_disable_entity_loader() is deprecated in php 8.0

XMLWordPrintable

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

      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?

            marina Marina Glancy
            marina Marina Glancy
            Simey Lameze Simey Lameze
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.