diff --git a/src/Illuminate/Foundation/Console/ServeCommand.php b/src/Illuminate/Foundation/Console/ServeCommand.php index 8d109b5c6f7c..194c80fa5127 100644 --- a/src/Illuminate/Foundation/Console/ServeCommand.php +++ b/src/Illuminate/Foundation/Console/ServeCommand.php @@ -287,8 +287,13 @@ protected function handleProcessOutput() } elseif (str($line)->contains(['Closed without sending a request'])) { // ... } elseif (! empty($line)) { - $warning = explode('] ', $line); - $this->components->warn(count($warning) > 1 ? $warning[1] : $warning[0]); + $position = strpos($line, '] '); + + if ($position !== false) { + $line = substr($line, $position + 1); + } + + $this->components->warn($line); } }); }