Skip to content

Commit

Permalink
Suppress a warning when the cf_status_firefox field is not set for a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Mar 14, 2023
1 parent c9b772e commit ccc2e44
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/pchevrel/BzKarma/Scoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,25 @@ public function getBugScoreDetails(int $bug): array
return $this->zeroBugScore();
}

/*
Beta and release are not affected, not a candidate for uplifting
*/
if (in_array($this->bugsData[$bug]['cf_status_firefox' . $this->beta], ['unaffected', 'disabled'])
&& in_array($this->bugsData[$bug]['cf_status_firefox' . $this->release], ['unaffected', 'disabled'])) {
return $this->zeroBugScore();
}

if ($this->nightlyScoreOnly === false) {
if (array_key_exists('cf_status_firefox' . $this->beta, $this->bugsData[$bug])
&& array_key_exists('cf_status_firefox' . $this->beta, $this->bugsData[$bug])) {
/*
Bug already uplifted, uplift value is 0
Beta and release are not affected, not a candidate for uplifting
*/
if (in_array($this->bugsData[$bug]['cf_status_firefox' . $this->beta], ['fixed', 'verified'])
&& in_array($this->bugsData[$bug]['cf_status_firefox' . $this->release], ['fixed', 'verified', 'unaffected'])) {
if (in_array($this->bugsData[$bug]['cf_status_firefox' . $this->beta], ['unaffected', 'disabled'])
&& in_array($this->bugsData[$bug]['cf_status_firefox' . $this->release], ['unaffected', 'disabled'])) {
return $this->zeroBugScore();
}

if ($this->nightlyScoreOnly === false) {
/*
Bug already uplifted, uplift value is 0
*/
if (in_array($this->bugsData[$bug]['cf_status_firefox' . $this->beta], ['fixed', 'verified'])
&& in_array($this->bugsData[$bug]['cf_status_firefox' . $this->release], ['fixed', 'verified', 'unaffected'])) {
return $this->zeroBugScore();
}
}
}

/*
Expand Down

0 comments on commit ccc2e44

Please sign in to comment.