Restore the original functionality
This commit is contained in:
parent
138a15404f
commit
c20c0a1812
|
@ -141,9 +141,9 @@ class XML
|
||||||
* @param string $elementname Name of the XML element of the target
|
* @param string $elementname Name of the XML element of the target
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function copy(&$source, &$target, string $elementname)
|
public static function copy(&$source, &$target, $elementname)
|
||||||
{
|
{
|
||||||
if (is_string($source)) {
|
if (count($source->children()) == 0) {
|
||||||
$target->addChild($elementname, self::escape($source));
|
$target->addChild($elementname, self::escape($source));
|
||||||
} else {
|
} else {
|
||||||
$child = $target->addChild($elementname);
|
$child = $target->addChild($elementname);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user