$remove is optional in set_labels

This commit is contained in:
JJRcop
2018-01-27 11:25:03 -05:00
committed by GitHub
parent 6042f5e2e9
commit f6dc5a82f7

View File

@@ -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)