Skip to content

Commit 45f9c50

Browse files
committed
check if labels exist
1 parent a31e0e0 commit 45f9c50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SecurityAlertIssue.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ public function __construct(array $data)
9898

9999
$labels = \getenv('JIRA_ISSUE_LABELS');
100100

101-
foreach (\explode(',', $labels) as $label) {
102-
$this->setKeyLabel($label);
101+
if ($labels) {
102+
foreach (\explode(',', $labels) as $label) {
103+
$this->setKeyLabel($label);
104+
}
103105
}
104106
}
105107

0 commit comments

Comments
 (0)