]> git.mxchange.org Git - friendica.git/commitdiff
Restore the original functionality
authorMichael <heluecht@pirati.ca>
Wed, 20 Jul 2022 05:47:30 +0000 (05:47 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 20 Jul 2022 05:47:30 +0000 (05:47 +0000)
src/Util/XML.php

index e371ea3cd628df93f6396027fcc595691fd2156e..a6e6cd5bab9d0c0417490e7304463150dfca4891 100644 (file)
@@ -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);