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.

Update bootstrap/helpers/parsers.php

Andras Bacsai334559bb0b11
diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.php
index 0ff5803663..7ed6d8c7a9 100644
--- a/bootstrap/helpers/parsers.php
+++ b/bootstrap/helpers/parsers.php
@@ -32,10 +32,9 @@ function validateDockerComposeForInjection(string $composeYaml): void
throw new \Exception('Invalid YAML format: '.$e->getMessage());
}
- if (! isset($parsed['services']) || ! is_array($parsed['services'])) {
+ if (! is_array($parsed) || ! isset($parsed['services']) || ! is_array($parsed['services'])) {
throw new \Exception('Docker Compose file must contain a "services" section');
}
-
// Validate service names
foreach ($parsed['services'] as $serviceName => $serviceConfig) {
try {