From 7eeba95ff287296f1a5bdcaa6053ca6d9ec50e55 Mon Sep 17 00:00:00 2001 From: AnturK Date: Wed, 3 Feb 2021 23:21:39 +0100 Subject: [PATCH] Skip first whitespace only lines (#56534) Parser won't crash on first empty lines anymore. --- 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; }