X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FXML.php;h=5355d30f995b36bfa77fe8268c1fd7362ef601ab;hb=46cd39fb34613f4b331793f19c0e562f93125066;hp=7933f4415b6f9a21677cffe7e090e24c7dd278f2;hpb=a10f55bb85b503c098ea1642adf4e9bda26e6746;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 {