coolify/bootstrap
Firsak d415f3a3d1 fix(team): prevent 500 after deleting the current team
When a user deletes their current team, the session and cache still
reference the just-deleted team. `refreshSession()` then resolves that
stale team via `currentTeam()`, calls `Team::find()` (which returns
null because the row is gone) and dereferences `$team->id`, leaving the
session without a current team. The subsequent redirect to the team
page assigns the now-null `currentTeam()` to the non-nullable
`Team $team` property in `Team\Index::mount()`, throwing a TypeError
and producing an HTTP 500.

Guard `refreshSession()` against a deleted current team: fall back to
any team the user still belongs to, and if none remain, clear the
stale session reference instead of dereferencing null.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:06:32 +02:00
..
cache init of v4 🌮 2023-03-17 15:33:48 +01:00
helpers fix(team): prevent 500 after deleting the current team 2026-05-22 11:06:32 +02:00
app.php testing php storm code cleanup and styling 2023-08-08 11:51:36 +02:00
getHelperVersion.php chore(versions): update coolify versions to v4.0.0-beta.389 and add helper version retrieval script 2025-01-22 14:01:05 +01:00
getRealtimeVersion.php refactor(workflows): replace jq with PHP script for version retrieval in workflows 2025-01-22 14:05:29 +01:00
getVersion.php Refactor getVersion.php to prevent GitHub Actions failure 2024-11-26 10:53:34 +01:00
includeHelpers.php Fix styling 2024-06-10 20:43:34 +00:00