Skip to content

Commit

Permalink
Add corner case check for null value in expandSqlServerAuditConfig fu…
Browse files Browse the repository at this point in the history
…nction (#12787) (#9167)

[upstream:51dc652b1c83a25107dc73b6cde62c9d7304210e]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jan 28, 2025
1 parent 8e2e3c9 commit 1b14199
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changelog/12787.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:none
```
2 changes: 1 addition & 1 deletion google-beta/services/sql/resource_sql_database_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ func expandSqlServerAdvancedMachineFeatures(configured interface{}) *sqladmin.Ad

func expandSqlServerAuditConfig(configured interface{}) *sqladmin.SqlServerAuditConfig {
l := configured.([]interface{})
if len(l) == 0 {
if len(l) == 0 || l[0] == nil {
return nil
}

Expand Down

0 comments on commit 1b14199

Please sign in to comment.