framework
framework copied to clipboard
[10.x] Prevent throw exception when cannot extract port from line
according to https://github.com/laravel/framework/issues/49927, when logging to stderr, certain strings will cause issues.
In handleProcessOutput of ServeCommand.php, the output is matched against certain strings. If these strings are found, additional logic is performed.
If strings that match the criteria are logged, it is possible that the strings are not what is expected, and will cause an exception
This pr solves this problem by checking that if it cannot extract the port from the line it does not enter the condition.
Please add a thorough description to your PR and not just link to a previous issue or PR, thanks!