From cd2cf79c55fce72b6ac042b550d1ee0b62285893 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 3 Feb 2021 23:32:56 +0100 Subject: [PATCH] [MIRROR] Skip first whitespace only lines in changelog PR parser (#3051) * Skip first whitespace only lines (#56534) Parser won't crash on first empty lines anymore. * Skip first whitespace only lines in changelog PR parser Co-authored-by: AnturK --- tools/WebhookProcessor/github_webhook_processor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/WebhookProcessor/github_webhook_processor.php b/tools/WebhookProcessor/github_webhook_processor.php index 1a9204bfa67..becd4b32ab6 100644 --- a/tools/WebhookProcessor/github_webhook_processor.php +++ b/tools/WebhookProcessor/github_webhook_processor.php @@ -745,6 +745,8 @@ function checkchangelog($payload, $compile = true) { } if (!strlen($firstword)) { + if (count($currentchangelogblock) <= 0) + continue; $currentchangelogblock[count($currentchangelogblock)-1]['body'] .= "\n"; continue; }