From: Michael Date: Wed, 20 Jul 2022 05:47:30 +0000 (+0000) Subject: Restore the original functionality X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c20c0a1812560d81ab5c0408d952eb4ae68ebc8b;p=friendica.git Restore the original functionality --- diff --git a/src/Util/XML.php b/src/Util/XML.php index e371ea3cd6..a6e6cd5bab 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -141,9 +141,9 @@ class XML * @param string $elementname Name of the XML element of the target * @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)); } else { $child = $target->addChild($elementname);