X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FXML.php;h=5355d30f995b36bfa77fe8268c1fd7362ef601ab;hb=60d9d7f5e07095c0bd60e6a03350181328637d94;hp=7933f4415b6f9a21677cffe7e090e24c7dd278f2;hpb=2a2e1a9e1271a85165fb6116999bca2fe1a71327;p=friendica.git diff --git a/src/Util/XML.php b/src/Util/XML.php index 7933f4415b..5355d30f99 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -1,6 +1,6 @@ $value) { @@ -125,7 +126,7 @@ class XML if (!is_array($value)) { $element = $xml->addChild($key, self::escape($value ?? ''), $namespace); - } elseif (is_array($value)) { + } else { $element = $xml->addChild($key, null, $namespace); self::fromArray($value, $element, $remove_header, $namespaces, false); } @@ -535,7 +536,7 @@ class XML * * @param string $str * @return string Escaped text. - * @todo Move this generic method to Util\Strings and also rewrite all other findingd + * @todo Move this generic method to Util\Strings and also rewrite all other occurrences */ public static function escape(string $str): string { @@ -547,7 +548,7 @@ class XML * * @param string $s xml escaped text * @return string unescaped text - * @todo Move this generic method to Util\Strings and also rewrite all other findingd + * @todo Move this generic method to Util\Strings and also rewrite all other occurrences */ public static function unescape(string $s): string {