Skip to content

Commit

Permalink
Fix check for any site for wildcard group
Browse files Browse the repository at this point in the history
  • Loading branch information
williamjallen committed May 3, 2024
1 parent d883b90 commit 1d4c185
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/cdash/public/api/v1/manageBuildGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
$rule_response['match'] = $match;

$siteid = $rule->SiteId;
if (empty($siteid)) {
if ((int) $siteid === 0) {
$rule_response['sitename'] = 'Any';
$rule_response['siteid'] = 0;
} else {
Expand All @@ -185,7 +185,7 @@
}
}
if (!$found) {
$site = Site::find($siteid);
$site = Site::findOrFail((int) $siteid);
$rule_response['sitename'] = $site->name;
}
}
Expand Down
7 changes: 1 addition & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15762,11 +15762,6 @@ parameters:
count: 1
path: app/cdash/public/api/v1/manageBuildGroup.php

-
message: "#^Cannot access property \\$name on App\\\\Models\\\\Site\\|Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\Site\\>\\|null\\.$#"
count: 1
path: app/cdash/public/api/v1/manageBuildGroup.php

-
message: "#^Cannot call method bindParam\\(\\) on PDOStatement\\|false\\.$#"
count: 3
Expand All @@ -15779,7 +15774,7 @@ parameters:

-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 6
count: 5
path: app/cdash/public/api/v1/manageBuildGroup.php

-
Expand Down

0 comments on commit 1d4c185

Please sign in to comment.