framework icon indicating copy to clipboard operation
framework copied to clipboard

[10.x] Prevent throw exception when cannot extract port from line

Open saeedhosseiinii opened this issue 1 year ago • 1 comments

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.

saeedhosseiinii avatar Feb 10 '24 13:02 saeedhosseiinii

Please add a thorough description to your PR and not just link to a previous issue or PR, thanks!

driesvints avatar Feb 12 '24 08:02 driesvints