diff --git a/app/Commands/DeployCommand.php b/app/Commands/DeployCommand.php index 110daf3..efc1a47 100644 --- a/app/Commands/DeployCommand.php +++ b/app/Commands/DeployCommand.php @@ -99,7 +99,8 @@ protected function deploy($serverId, $siteId, $domain, $data, $isScheduled = fal exit(); } - $this->info(Arr::first($deploying['data'])['message']); + $firstValue = Arr::first($deploying['data']); + $this->info(is_array($firstValue) ? $firstValue['message'] : $firstValue); if ($isScheduled) { return; @@ -186,7 +187,7 @@ private function getLatestDeploymentId(int $serverId, int $siteId): ?int try { $deployment = $poller->getLatestDeployment($serverId, $siteId); - return $deployment['id'] ?? null; + return isset($deployment['id']) ? (int) $deployment['id'] : null; } catch (Exception $e) { $this->error('Failed to get latest deployment: '.$e->getMessage());