From 6624e9d3e7a7019ec8e32301c97700d544d25205 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 27 Oct 2017 12:23:11 +0200 Subject: [PATCH] Revert "Don't add empty notes." package.xml must not contain empty tags. This reverts commit 46053373d16dfe9d93ea10a6ea8927ee056401eb. --- lib/Horde/Pear/Package/Xml.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Horde/Pear/Package/Xml.php b/lib/Horde/Pear/Package/Xml.php index 640d413..4bc654d 100644 --- a/lib/Horde/Pear/Package/Xml.php +++ b/lib/Horde/Pear/Package/Xml.php @@ -469,11 +469,9 @@ public function setNotes(array $notes) { $thisVersion = $this->getVersion(); foreach ($notes as $version => $info) { - $new_notes = implode("\n* ", explode("\n", trim($info['notes']))); - if ($new_notes) { - $new_notes = "\n* " . $new_notes; - } - $new_notes .= "\n "; + $new_notes = "\n* " + . implode("\n* ", explode("\n", trim($info['notes']))) + . "\n "; if ($version == $thisVersion) { $this->replaceTextNode('/p:package/p:notes', $new_notes); }