From 497dcd9d9e5c5aa1a7b394459144e82194345c1e Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 24 Jan 2018 15:50:59 -0500 Subject: [PATCH 1/2] Merge pull request #34895 from JJRcop/patch-16 #34889 Fixes possible issue with set_labels --- tools/WebhookProcessor/github_webhook_processor.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/WebhookProcessor/github_webhook_processor.php b/tools/WebhookProcessor/github_webhook_processor.php index 604f87678e..f7ea3eecfc 100644 --- a/tools/WebhookProcessor/github_webhook_processor.php +++ b/tools/WebhookProcessor/github_webhook_processor.php @@ -179,7 +179,9 @@ function set_labels($payload, $labels, $remove) { $tags = array_merge($labels, $existing); $tags = array_unique($tags); - $tags = array_diff($tags, $remove); + if($remove) { + $tags = array_diff($tags, $remove); + } $final = array(); foreach($tags as $t)