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.

Refactor BackupExecutions.php to use optional chaining for deleting failed backup executions

Andras Bacsaibb451ac3b5c8
diff --git a/app/Livewire/Project/Database/BackupExecutions.php b/app/Livewire/Project/Database/BackupExecutions.php
index a34d849f29..101bb4593c 100644
--- a/app/Livewire/Project/Database/BackupExecutions.php
+++ b/app/Livewire/Project/Database/BackupExecutions.php
@@ -20,7 +20,7 @@ class BackupExecutions extends Component
public function cleanupFailed()
{
- $this->backup->executions()->where('status', 'failed')->delete();
+ $this->backup?->executions()->where('status', 'failed')->delete();
$this->refreshBackupExecutions();
}
public function deleteBackup($exeuctionId)