[3.10] [PHP 8.1] Fix UriHelper Automatic conversion of false to array#36774
[3.10] [PHP 8.1] Fix UriHelper Automatic conversion of false to array#36774beat wants to merge 3 commits intojoomla:3.10-devfrom
Conversation
Fixes `Deprecated: Automatic conversion of false to array is deprecated in libraries/vendor/joomla/uri/src/UriHelper.php on line 50`
|
I have tested this item ✅ successfully on 7f591bc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36774. |
|
I have tested this item ✅ successfully on 8be1c23 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36774. |
Thank you @richard67 for the reviews and feedback. After 2nd thought, found and committed a way more elegant fix proposal. Actually the function definition itself isn't elegant, as it's returning The really elegant fix would be to change the API and return an empty array instead of bool false, and as as |
Yeah, we have to live with that mess, but as far as I know it shall be cleaned up with 5.0, and that will be next year. So there is light at the end of the tunnel (I hope it's not a train) :-) |
|
I have tested this item ✅ successfully on 8be1c23 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36774. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36774. |
|
This here is a change in a composer dependency so this PR should be send against the framework's 1.x branch from where we would take it back down to the CMS. |
Done here: joomla-framework/uri#30 Letting you merge and/or close this PR once the framework-PR is merged. |
|
Let us close here and once @nibra did the upstream merge and version release we can pull the changes in with an composer update. |
Fixes
Deprecated: Automatic conversion of false to array is deprecated in libraries/vendor/joomla/uri/src/UriHelper.php on line 50Pull Request for Issue # none, directly fix proposal.
Summary of Changes
Another PHP 8.1 warning fix.
Testing Instructions
Just review code would be enough as it's obvious PHP 8.1 issue and fix.
Open admin aera in PHP 8.1, find this warning.
Actual result BEFORE applying this Pull Request
Deprecated: Automatic conversion of false to array is deprecated in libraries/vendor/joomla/uri/src/UriHelper.php on line 50Expected result AFTER applying this Pull Request
Not that warning anymore.
Documentation Changes Required
none.