Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.2 Legacy Error in WebClient.php not solved by #42830 #43334

Open
ssabatini opened this issue Apr 23, 2024 · 2 comments
Open

PHP 8.2 Legacy Error in WebClient.php not solved by #42830 #43334

ssabatini opened this issue Apr 23, 2024 · 2 comments

Comments

@ssabatini
Copy link

Steps to reproduce the issue

View PHP Error log for Joomla site with PHP 8.2.X.
Look for warnings "stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated ..."

Expected result

No warnings regarding "stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated ..." anymore.

Actual result

#42830 has fixed this warning only in the function detectBrowser(), but the same warning (with the same reason) is produced by the functions detectEngine() and detectPlatform().

Additionally, the function detectRobot() does as well not test if the user agent is null.

@alikon
Copy link
Contributor

alikon commented Apr 25, 2024

please check joomla-framework/application#124

@ssabatini
Copy link
Author

@alikon The fix looks good. The first fix with issue #42830 should be unnecessary now; the if ($userAgent !== null) in the method detectBrowser can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants