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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-05-07 15:58:42 +00:00
parent d61dabfc3c
commit 3cd86d0e21
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ class AtomParser {
function ns_to_prefix($qname, $attr=false) {
# split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
$components = split(":", $qname);
$components = explode(":", $qname);
# grab the last one (e.g 'div')
$name = array_pop($components);

View File

@ -114,7 +114,7 @@ class MagpieRSS {
// check for a namespace, and split if found
$ns = false;
if ( strpos( $element, ':' ) ) {
list($ns, $el) = split( ':', $element, 2);
list($ns, $el) = explode( ':', $element, 2);
}
if ( $ns and $ns != 'rdf' ) {
$this->current_namespace = $ns;