From b91257e97ff3ac0319cbce97246207c531b8f0cb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 17 Oct 2020 15:43:39 +0000 Subject: [PATCH] Feeds: Fix "Only variables should be passed by reference" PHP notice in `atomlib.php`. Props jrf. Fixes #51558. git-svn-id: https://develop.svn.wordpress.org/trunk@49182 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/atomlib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/atomlib.php b/src/wp-includes/atomlib.php index ce62b13599..97f85baf2d 100644 --- a/src/wp-includes/atomlib.php +++ b/src/wp-includes/atomlib.php @@ -191,7 +191,8 @@ class AtomParser { function start_element($parser, $name, $attrs) { - $tag = array_pop(explode(":", $name)); + $name_parts = explode(":", $name); + $tag = array_pop($name_parts); switch($name) { case $this->NS . ':feed': @@ -270,7 +271,8 @@ class AtomParser { function end_element($parser, $name) { - $tag = array_pop(explode(":", $name)); + $name_parts = explode(":", $name); + $tag = array_pop($name_parts); $ccount = count($this->in_content);