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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
chore: Handle JSON parsing errors in format_docker_command_output_to_json
Andras Bacsaiec191af874b8
diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.phpindex 21e946a9a7..0aa5c6b74e 100644--- a/bootstrap/helpers/docker.php+++ b/bootstrap/helpers/docker.php@@ -48,9 +48,13 @@ function format_docker_command_output_to_json($rawOutput): Collection$outputLines = collect($outputLines);}- return $outputLines- ->reject(fn ($line) => empty($line))- ->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR));+ try {+ return $outputLines+ ->reject(fn ($line) => empty($line))+ ->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR));+ } catch (\Throwable $e) {+ return collect([]);+ }}function format_docker_labels_to_json(string|array $rawOutput): Collection