Skip to content

[5.3] Language switcher php deprecated notices #45261

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

Closed
wants to merge 1 commit into from

Conversation

brianteeman
Copy link
Contributor

Pull Request for Issue #43293 .

Summary of Changes

Fixes

  • Deprecated: strtolower(): Passing null to parameter Test #1 ($string) of type string is deprecated in libraries/src/Extension/ExtensionManagerTrait.php on line 45
  • Deprecated: str_replace(): Passing null to parameter Ignore configuration.php #3 ($subject) of type array|string is deprecated in modules/mod_languages/src/Helper/LanguagesHelper.php on line 79

Testing Instructions

Make sure you are using php 8.1 or higher
Create a bilingual site
Create an instance of mod_languages in a position that exists also on an error page
In global configuration, set error reporting to maximum
Navigate to a url that will produce an error

Actual result BEFORE applying this Pull Request

two deprecated messages displayed

Expected result AFTER applying this Pull Request

No errors displayed

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

@ghost
Copy link

ghost commented Apr 1, 2025

I have tested this item ✅ successfully on a51f43c

Before PR

Screenshot 2025-04-01 at 10-45-28 Error 404

After PR

Screenshot 2025-04-01 at 10-46-55 Error 404


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45261.

@exlemor
Copy link

exlemor commented Apr 5, 2025

I have tested this item ✅ successfully on a51f43c

I have tested this successfully. Thanks @brianteeman.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45261.

@bembelimen
Copy link
Contributor

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45261.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 7, 2025
@joomdonation
Copy link
Contributor

The right fix for the issue is #45262 . The change in this PR does not really fix the issue, it is just hiding the issue with our code elsewhere (for example, we should check and only call bootComponent if $component is not null instead, later, we can use string type for the parameter and let PHP throws the error if the passed argument is invalid). I suggest to close this PR.

@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label Apr 9, 2025
@HLeithner
Copy link
Member

We do not cast null to string (or ?? '') to make php happy, that's simple the wrong way to go, because there is a reason we get NULL. This should not happen and needs to be fixed, as tuan did in #45262

I'm closing this.

@HLeithner HLeithner closed this Apr 10, 2025
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 10, 2025
@brianteeman
Copy link
Contributor Author

ok

@brianteeman brianteeman deleted the mod_language branch April 10, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-5.3-dev RMDQ ReleaseManagerDecisionQueue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants