Skip to content

fix: Add null fallback for firewall rules response#367

Open
zigzagdev wants to merge 1 commit into
DigitalOceanPHP:5.1from
zigzagdev:add-fallback-method
Open

fix: Add null fallback for firewall rules response#367
zigzagdev wants to merge 1 commit into
DigitalOceanPHP:5.1from
zigzagdev:add-fallback-method

Conversation

@zigzagdev
Copy link
Copy Markdown

What I have done

Add null coalescing fallback (?? []) to above method in Database.php to prevent errors when the API response returns null for rules.

  • getFirewallRules
  • getBackups
  • getAllReplicas
  • getAllUsers
  • getAllDatabases
  • getAllConnectionPools

Notes

Because there are no existing tests cover the Database API, tests were not included in this PR.
Happy to add PHPUnit tests if needed!

@zigzagdev zigzagdev force-pushed the add-fallback-method branch from 8fdd176 to 0f1d255 Compare May 14, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant