Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: initialize Collection properties to handle queue deserialization edge cases

Andras Bacsai85b73a8c005f
diff --git a/app/Jobs/PushServerUpdateJob.php b/app/Jobs/PushServerUpdateJob.php
index 9f81155be1..b3a0f35907 100644
--- a/app/Jobs/PushServerUpdateJob.php
+++ b/app/Jobs/PushServerUpdateJob.php
@@ -105,6 +105,20 @@ class PushServerUpdateJob implements ShouldBeEncrypted, ShouldQueue, Silenced
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');