Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Api/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function getFirewallRules(string $clusterId): array

return \array_map(function ($rule) {
return new DatabaseRuleEntity($rule);
}, $rules->rules);
}, $rules->rules ?? []);
}

/**
Expand Down Expand Up @@ -146,7 +146,7 @@ public function getBackups(string $clusterId): array

return \array_map(function ($backup) {
return new DatabaseBackupEntity($backup);
}, $backups->backups);
}, $backups->backups ?? []);
}

/**
Expand Down Expand Up @@ -180,7 +180,7 @@ public function getAllReplicas(string $clusterId): array

return \array_map(function ($replica) {
return new DatabaseReplicaEntity($replica);
}, $replicas->replicas);
}, $replicas->replicas ?? []);
}

/**
Expand Down Expand Up @@ -228,7 +228,7 @@ public function getAllUsers(string $clusterId): array

return \array_map(function ($user) {
return new DatabaseUserEntity($user);
}, $users->users);
}, $users->users ?? []);
}

/**
Expand Down Expand Up @@ -289,7 +289,7 @@ public function getAllDatabases(string $clusterId): array

return \array_map(function ($database) {
return new DatabaseEntity($database);
}, $databases->dbs);
}, $databases->dbs ?? []);
}

/**
Expand Down Expand Up @@ -333,7 +333,7 @@ public function getAllConnectionPools(string $clusterId): array

return \array_map(function ($pool) {
return new DatabasePoolEntity($pool);
}, $pools->pools);
}, $pools->pools ?? []);
}

/**
Expand Down