From 4721007c026af7e1f5b9bf6215aefd4a64316af8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 17 Mar 2021 21:36:53 +0100 Subject: [PATCH] [ticket/16730] Don't do additional sorting or output without any tickets PHPBB3-16730 --- build/build_changelog.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/build/build_changelog.php b/build/build_changelog.php index b2efdaaea7..9457c26511 100755 --- a/build/build_changelog.php +++ b/build/build_changelog.php @@ -38,6 +38,7 @@ else $xml = simplexml_load_string(file_get_contents($url)); } +$types = []; foreach ($xml->xpath('//item') as $item) { $key = (string) $item->key; @@ -51,17 +52,20 @@ foreach ($xml->xpath('//item') as $item) $types[(string) $item->type][$key] = $value; } -ksort($types); -foreach ($types as $type => $tickets) +if (count($types)) { - echo "

$type

\n"; - echo "\n"; }