65535) { throw new \RuntimeException('Mail Gateway ticket body limit cannot exceed 65535 bytes'); } foreach (['php_cli_paths', 'composer_paths'] as $key) { if (!isset($settings[$key]) || !is_array($settings[$key]) || $settings[$key] === []) { throw new \RuntimeException('Mail Gateway config.php requires executable paths for ' . $key); } foreach ($settings[$key] as $value) { if (!is_string($value) || !str_starts_with($value, '/') || str_contains($value, "\0")) { throw new \RuntimeException('Mail Gateway executable paths must be absolute paths'); } } } return $settings; } }