Make WordPress Core


Ignore:
Timestamp:
12/20/2021 07:31:37 PM (4 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Update the SimplePie library to version 1.5.7.

This version shows significant improvements in the compatibility of SimplePie with PHP 8.0, 8.1, and even contains an initial PHP 8.2 fix. The release also contains a number of other bug fixes.

Release notes: https://github.com/simplepie/simplepie/releases/tag/1.5.7

For a full list of changes in this update, see the SimplePie GitHub:
https://github.com/simplepie/simplepie/compare/1.5.6...1.5.7

Follow-up to [47733], [49176].

Props jrf, SergeyBiryukov.
Fixes #54659.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/SimplePie/Locator.php

    r49176 r52393  
    6565    var $force_fsockopen = false;
    6666    var $curl_options = array();
     67    var $dom;
    6768    protected $registry;
    6869
     
    7677        $this->curl_options = $curl_options;
    7778
    78         if (class_exists('DOMDocument'))
     79        if (class_exists('DOMDocument') && $this->file->body != '')
    7980        {
    8081            $this->dom = new DOMDocument();
    8182
    8283            set_error_handler(array('SimplePie_Misc', 'silence_errors'));
    83             $this->dom->loadHTML($this->file->body);
     84            try
     85            {
     86                $this->dom->loadHTML($this->file->body);
     87            }
     88            catch (Throwable $ex)
     89            {
     90                $this->dom = null;
     91            }
    8492            restore_error_handler();
    8593        }
Note: See TracChangeset for help on using the changeset viewer.