Make WordPress Core


Ignore:
Timestamp:
12/20/2021 07:31:37 PM (3 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/HTTP/Parser.php

    r47733 r52393  
    508508        $data = explode("\r\n\r\n", $headers, $count);
    509509        $data = array_pop($data);
    510         if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n\r\n")) {
    511             $data = str_ireplace("HTTP/1.0 200 Connection established\r\n\r\n", '', $data);
    512         }
    513         if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n\r\n")) {
    514             $data = str_ireplace("HTTP/1.1 200 Connection established\r\n\r\n", '', $data);
     510        if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n")) {
     511            $exploded = explode("\r\n\r\n", $data, 2);
     512            $data = end($exploded);
     513        }
     514        if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n")) {
     515            $exploded = explode("\r\n\r\n", $data, 2);
     516            $data = end($exploded);
    515517        }
    516518        return $data;
Note: See TracChangeset for help on using the changeset viewer.