From 85b73a8c005fa42d5cc3ffaf654f2036cf7e97c1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:25:25 +0100 Subject: [PATCH] fix: initialize Collection properties to handle queue deserialization edge cases --- app/Jobs/PushServerUpdateJob.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/Jobs/PushServerUpdateJob.php b/app/Jobs/PushServerUpdateJob.php index 9f81155be..b3a0f3590 100644 --- a/app/Jobs/PushServerUpdateJob.php +++ b/app/Jobs/PushServerUpdateJob.php @@ -105,6 +105,20 @@ public function __construct(public Server $server, public $data) public function handle() { + // Defensive initialization for Collection properties to handle queue deserialization edge cases + $this->serviceContainerStatuses ??= collect(); + $this->applicationContainerStatuses ??= collect(); + $this->foundApplicationIds ??= collect(); + $this->foundDatabaseUuids ??= collect(); + $this->foundServiceApplicationIds ??= collect(); + $this->foundApplicationPreviewsIds ??= collect(); + $this->foundServiceDatabaseIds ??= collect(); + $this->allApplicationIds ??= collect(); + $this->allDatabaseUuids ??= collect(); + $this->allTcpProxyUuids ??= collect(); + $this->allServiceApplicationIds ??= collect(); + $this->allServiceDatabaseIds ??= collect(); + // TODO: Swarm is not supported yet if (! $this->data) { throw new \Exception('No data provided');