[6.0] Fix PHP 8.5 null access on array deprecation warning#46733
[6.0] Fix PHP 8.5 null access on array deprecation warning#46733Bodge-IT merged 1 commit intojoomla:6.0-devfrom
Conversation
|
I have tested this item ✅ successfully on 3bc899f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46733. |
|
Get a second warning: But this is already present in J5.4 |
|
I have tested this item ✅ successfully on 3bc899f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46733. |
I expect this is the same code in 5.4 and 6.0 so should be fixed in 5.4 and upmerged. |
Yes, see #46736 |
|
r2c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46733. |
|
Thank you for the fix @HLeithner and thanks @heelc29 & @Fedik for prompt tests |
The new code for system language filter plugin uses
nullas default $lang value, this leads to a deprecation warning later in the code for PHP 8.5.Deprecated: Using null as an array offset is deprecated, use an empty string instead in /plugins/system/languagefilter/src/Extension/LanguageFilter.php on line 376
Summary of Changes
Set the default value to an empty string.
Testing Instructions
Activate full deprecation logging on php 8.5, and try to login with passkeys
Actual result BEFORE applying this Pull Request
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /plugins/system/languagefilter/src/Extension/LanguageFilter.php on line 376
Login Error message that the user has no passkey configuration
Expected result AFTER applying this Pull Request
No Deprecation message and Passkey login Prompt
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed