You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Here
If strings that match the criteria are logged, it is possible that the strings are not what is expected, and will cause an exception (See steps to reproduce.)
Steps To Reproduce
Create a new laravel project
In .env, change LOG_CHANNEL to stderr
Add the following code such that will be run: Log::info(' Accepted:');
An Undefined array key 1 exception will be thrown.
This is because the process output contains Accepted. This causes regex to be run to look for the port number after the colon. Since there is no port number, this fails and causes the exception. This is where it happens
The text was updated successfully, but these errors were encountered:
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Laravel Version
10.43.0
PHP Version
8.2.15
Database Driver & Version
No response
Description
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.
Here
If strings that match the criteria are logged, it is possible that the strings are not what is expected, and will cause an exception (See steps to reproduce.)
Steps To Reproduce
Log::info(' Accepted:');
Undefined array key 1
exception will be thrown.This is because the process output contains
Accepted
. This causes regex to be run to look for the port number after the colon. Since there is no port number, this fails and causes the exception. This is where it happensThe text was updated successfully, but these errors were encountered: