From 334559bb0b11458b2781daec4ebe746cb7aec5de Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:07:59 +0200 Subject: [PATCH] Update bootstrap/helpers/parsers.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- bootstrap/helpers/parsers.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.php index 0ff580366..7ed6d8c7a 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 {