View PHP Error log for Joomla site with PHP 8.2.X.
Look for warnings "stripos(): Passing null to parameter https://github.com/joomla/joomla-cms/pull/1 ($haystack) of type string is deprecated ..."
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 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.
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 https://github.com/joomla/joomla-cms/pull/1 ($haystack) of type string is deprecated ..."
Expected result
No warnings regarding "stripos(): Passing null to parameter https://github.com/joomla/joomla-cms/pull/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 functionsdetectEngine()
anddetectPlatform()
.Additionally, the function
detectRobot()
does as well not test if the user agent isnull
.