diff --git a/src/Illuminate/Foundation/Console/ServeCommand.php b/src/Illuminate/Foundation/Console/ServeCommand.php index 9a27fa459644..b966291f3ab0 100644 --- a/src/Illuminate/Foundation/Console/ServeCommand.php +++ b/src/Illuminate/Foundation/Console/ServeCommand.php @@ -251,9 +251,12 @@ protected function handleProcessOutput() $this->requestsPool[$requestPort][1] = trim(explode('[200]: GET', $line)[1]); } elseif (str($line)->contains(' Closing')) { $requestPort = $this->getRequestPortFromLine($line); - $request = $this->requestsPool[$requestPort]; - [$startDate, $file] = $request; + if (empty($this->requestsPool[$requestPort])) { + return; + } + + [$startDate, $file] = $this->requestsPool[$requestPort]; $formattedStartedAt = $startDate->format('Y-m-d H:i:s');