WordPress.org

Make WordPress Core

Changeset 37402


Ignore:
Timestamp:
05/07/2016 03:58:42 PM (3 years ago)
Author:
ocean90
Message:

External Libraries: Replace split() with explode() in the deprecated Atom and MagpieRSS files.

Before PHP7 split() was throwing a deprecated notice, in PHP7 the function is completely removed and throws a fatal error.

Props achbed.
Fixes #20673.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r32990 r37402  
    314314    function ns_to_prefix($qname, $attr=false) {
    315315        # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
    316         $components = split(":", $qname);
     316        $components = explode(":", $qname);
    317317
    318318        # grab the last one (e.g 'div')
  • trunk/src/wp-includes/rss.php

    r33734 r37402  
    115115        $ns = false;
    116116        if ( strpos( $element, ':' ) ) {
    117             list($ns, $el) = split( ':', $element, 2);
     117            list($ns, $el) = explode( ':', $element, 2);
    118118        }
    119119        if ( $ns and $ns != 'rdf' ) {
Note: See TracChangeset for help on using the changeset viewer.