Skip to content

Commit

Permalink
Fix missing array key issue with FrankenPHP
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Jan 1, 2024
1 parent 398c986 commit 14d88ce
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Commands/StartFrankenPhpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,13 @@ protected function writeServerOutput($server)
return $this->info($output);
}

if (is_array($stream = json_decode($debug['msg'], true))) {
$message = $debug['msg'] ?? '';

if (is_array($stream = json_decode($message, true))) {
return $this->handleStream($stream);
}

if ($debug['msg'] == 'handled request') {
if ($message == 'handled request') {
if (! $this->laravel->isLocal()) {
return;
}
Expand Down Expand Up @@ -300,7 +302,7 @@ protected function writeServerOutput($server)
}

if ($debug['level'] === 'warn') {
return $this->warn($debug['msg']);
return $this->warn($message);
}

if ($debug['level'] !== 'info') {
Expand All @@ -309,7 +311,7 @@ protected function writeServerOutput($server)
return;
}

return $this->error($debug['msg']);
return $this->error($message);
}
});
}
Expand Down

0 comments on commit 14d88ce

Please sign in to comment.