application
application copied to clipboard
stripos null user agent warning
stripos can not take a null value as an argument in PHP 8.1+
Deprecated: strpos(): Passing null to parameter #1 ($haystack)
Summary of Changes
check $userAgent before use stripos() function
Testing Instructions
make GET request without User Agent header
Documentation Changes Required
nothing
Thanks for the PR.
Sorry for the delay in replying:
- Please fix the code style issues
- It would be better to make an early return when the $userAgent is empty, moving "$this->detection['engine'] = true;" to the top of the functions is fine
- Please make the change for all detect functions.
Alternative PR #131
Thank you for proposing this. As @Quy provided a better alternative, we are going with that one. Because of that, I'm closing this one. Thank you for your time.