From c73c45a1a5effb8e3fdedff369aa0b92cc719aa3 Mon Sep 17 00:00:00 2001 From: timlenton Date: Thu, 16 Feb 2017 12:04:03 +0000 Subject: [PATCH] Fixed issue with duplicate nodes being created --- src/LukeSnowden/GoogleShoppingFeed/Node.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LukeSnowden/GoogleShoppingFeed/Node.php b/src/LukeSnowden/GoogleShoppingFeed/Node.php index 57826c8..49264ba 100644 --- a/src/LukeSnowden/GoogleShoppingFeed/Node.php +++ b/src/LukeSnowden/GoogleShoppingFeed/Node.php @@ -86,7 +86,6 @@ public function attachNodeTo(\SimpleXMLElement $parent) if ($this->cdata && ! preg_match("#^value)) { $this->value = "value}]]>"; } - $parent->addChild($this->name, '', $this->_namespace); - $parent->{$this->name} = $this->value; + $parent->addChild($this->name, $this->value, $this->_namespace); } }