Make WordPress Core


Ignore:
Timestamp:
05/01/2020 02:24:42 PM (5 years ago)
Author:
desrosj
Message:

External Libraries: Update the SimplePie library to the latest version (1.5.5).

This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.

File:
1 edited

Legend:

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

    r46260 r47733  
    66 * Takes the hard work out of managing a complete RSS/Atom solution.
    77 *
    8  * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
     8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
    99 * All rights reserved.
    1010 *
     
    3434 *
    3535 * @package SimplePie
    36  * @version 1.3.1
    37  * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
     36 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
    3837 * @author Ryan Parman
    39  * @author Geoffrey Sneddon
     38 * @author Sam Sneddon
    4039 * @author Ryan McCue
    4140 * @link http://simplepie.org/ SimplePie
     
    10099        // German
    101100        'montag' => 1,
     101        'mo' => 1,
    102102        'dienstag' => 2,
     103        'di' => 2,
    103104        'mittwoch' => 3,
     105        'mi' => 3,
    104106        'donnerstag' => 4,
     107        'do' => 4,
    105108        'freitag' => 5,
     109        'fr' => 5,
    106110        'samstag' => 6,
     111        'sa' => 6,
    107112        'sonnabend' => 6,
     113        // AFAIK no short form for sonnabend
     114        'so' => 7,
    108115        'sonntag' => 7,
    109116        // Italian
     
    147154        'Σαβ' => 6,
    148155        'Κυρ' => 7,
     156        // Russian
     157        'Пн.' => 1,
     158        'Вт.' => 2,
     159        'Ср.' => 3,
     160        'Чт.' => 4,
     161        'Пт.' => 5,
     162        'Сб.' => 6,
     163        'Вс.' => 7,
    149164    );
    150165
     
    174189        'august' => 8,
    175190        'sep' => 9,
    176         'september' => 8,
     191        'september' => 9,
    177192        'oct' => 10,
    178193        'october' => 10,
     
    209224        // German
    210225        'januar' => 1,
     226        'jan' => 1,
    211227        'februar' => 2,
     228        'feb' => 2,
    212229        'märz' => 3,
     230        'mär' => 3,
    213231        'april' => 4,
    214         'mai' => 5,
     232        'apr' => 4,
     233        'mai' => 5, // no short form for may
    215234        'juni' => 6,
     235        'jun' => 6,
    216236        'juli' => 7,
     237        'jul' => 7,
    217238        'august' => 8,
     239        'aug' => 8,
    218240        'september' => 9,
     241        'sep' => 9,
    219242        'oktober' => 10,
     243        'okt' => 10,
    220244        'november' => 11,
     245        'nov' => 11,
    221246        'dezember' => 12,
     247        'dez' => 12,
    222248        // Italian
    223249        'gennaio' => 1,
     
    291317        'Οκτ' => 10,
    292318        'Νοέ' => 11,
    293         'Δεκ' => 12,
     319        'Δεκ' => 12,       
     320        // Russian
     321        'Янв' => 1,
     322        'января' => 1,
     323        'Фев' => 2,
     324        'февраля' => 2,
     325        'Мар' => 3,
     326        'марта' => 3,
     327        'Апр' => 4,
     328        'апреля' => 4,
     329        'Май' => 5,
     330        'мая' => 5,
     331        'Июн' => 6,
     332        'июня' => 6,
     333        'Июл' => 7,
     334        'июля' => 7,
     335        'Авг' => 8,
     336        'августа' => 8,
     337        'Сен' => 9,
     338        'сентября' => 9,
     339        'Окт' => 10,
     340        'октября' => 10,
     341        'Ноя' => 11,
     342        'ноября' => 11,
     343        'Дек' => 12,
     344        'декабря' => 12,
     345
    294346    );
    295347
     
    615667     * @final
    616668     * @access public
    617      * @param callable $callback
     669     * @param callback $callback
    618670     */
    619671    public function add_callback($callback)
     
    632684     * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as
    633685     * well as allowing any of upper or lower case "T", horizontal tabs, or
    634      * spaces to be used as the time seperator (including more than one))
     686     * spaces to be used as the time separator (including more than one))
    635687     *
    636688     * @access protected
     
    692744
    693745            // Convert the number of seconds to an integer, taking decimals into account
    694             $second = round($match[6] + $match[7] / pow(10, strlen($match[7])));
     746            $second = round((int)$match[6] + (int)$match[7] / (10 ** strlen($match[7])));
    695747
    696748            return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
    697749        }
    698         else
    699         {
    700             return false;
    701         }
     750
     751        return false;
    702752    }
    703753
     
    722772            $output .= substr($string, $position, $pos - $position);
    723773            $position = $pos + 1;
    724             if ($string[$pos - 1] !== '\\')
     774            if ($pos === 0 || $string[$pos - 1] !== '\\')
    725775            {
    726776                $depth++;
     
    850900            return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
    851901        }
    852         else
    853         {
    854             return false;
    855         }
     902
     903        return false;
    856904    }
    857905
     
    915963            return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone;
    916964        }
    917         else
    918         {
    919             return false;
    920         }
     965
     966        return false;
    921967    }
    922968
     
    9571003            return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
    9581004        }
    959         else
    960         {
    961             return false;
    962         }
     1005
     1006        return false;
    9631007    }
    9641008
     
    9761020            return false;
    9771021        }
    978         else
    979         {
    980             return $strtotime;
    981         }
     1022
     1023        return $strtotime;
    9821024    }
    9831025}
    984 
Note: See TracChangeset for help on using the changeset viewer.