Skip to content

Commit

Permalink
chore: check valid type on pkg key gen
Browse files Browse the repository at this point in the history
  • Loading branch information
bduranleau-nr committed Apr 18, 2024
1 parent 749f298 commit 375dc80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daemon/internal/newrelic/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ func (app *App) filterPhpPackages(data []byte) []byte {
log.Errorf("invalid php package json structure: %+v", pkg)
return nil
}
pkgKey = PhpPackagesKey{pkg[0].(string), pkg[1].(string)}
_, ok := app.PhpPackages[pkgKey]
name, ok := pkg[0].(string)
version, ok := pkg[1].(string)
pkgKey = PhpPackagesKey{name, version}
_, ok = app.PhpPackages[pkgKey]
if !ok {
app.PhpPackages[pkgKey] = struct{}{}
newPkgs = append(newPkgs, pkgKey)
Expand Down

0 comments on commit 375dc80

Please sign in to comment.