[8.x] Avoid overwrite last ip or user_agent with empty ones on DatabaseSessionHandler#39741
[8.x] Avoid overwrite last ip or user_agent with empty ones on DatabaseSessionHandler#39741PaolaRuby wants to merge 1 commit into
Conversation
|
What if it's the very first request and there is no ip_address information in the session payload? Should we initialize it to empty string then? Otherwise this could be a breaking change if people are always expecting it to be there. |
|
With the actual code first insert could has null fields if framework/src/Illuminate/Session/DatabaseSessionHandler.php Lines 234 to 244 in e4b54ba framework/src/Illuminate/Session/Console/stubs/database.stub Lines 19 to 20 in 277c2fb They are nullable, but could be a breaking change, i will fix it
|
tlaverdure/laravel-echo-server#546 In some cases request doesn'nt has `ipAddress` or `userAgent`, with this change it avoid overwrite the last reported data
|
@taylorotwell fixed |
|
Not sure I want to resolve the request from the container here. It looks like once that PR is merged on the echo-server then the problem will be solved. |
|
@taylorotwell echo-server is already abandoned, that PR will not be merged, and it was just an example I should have used array_filter 😕 |
tlaverdure/laravel-echo-server#546
In some cases request does'nt has
ipAddressoruserAgent, with this change it avoid overwrite the last reported data