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
It appears that the method getUserAgent of Mobile_Detect returns null, which is correct according to the docbloc of the method, while parseAgent in ParserCreator expects a string. Based on the logs I'm not able to recreate the request which caused it. There is no request logged in the access_log on the same time, but before and after the time of the Laravel log I see some activity from the Bing bot.
As I can't reproduce the request it's kind of hard to find the exact reason why this fails. Therefore I did not create a PR. My suggestion for a fix is to check the user agent first in the constructor of Filter.php and then check it in validateRules:
In some cases I see the following log in my Laravel logs:
It appears that the method
getUserAgent
ofMobile_Detect
returnsnull
, which is correct according to the docbloc of the method, whileparseAgent
inParserCreator
expects a string. Based on the logs I'm not able to recreate the request which caused it. There is no request logged in theaccess_log
on the same time, but before and after the time of the Laravel log I see some activity from the Bing bot.As I can't reproduce the request it's kind of hard to find the exact reason why this fails. Therefore I did not create a PR. My suggestion for a fix is to check the user agent first in the constructor of
Filter.php
and then check it invalidateRules
:But as said, because I can't recreate the request I cannot test this solution.
I'm using version 3.1.0 of this package with PHP 8.2.
The text was updated successfully, but these errors were encountered: