? ? PHP 8.x Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
21 Mar 2022

Pull Request for Issue # .

Summary of Changes

Alternative solution to PR #37324 . I think we should not pass a null or empty value to $lang->hasKey method.

Testing Instructions

  1. Use Joomla 4 on PHP 8.1
  2. Go to System -> Plugins, click on a plugin.

Actual result BEFORE applying this Pull Request

See message

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/src/Language/Language.php on line 1181

Expected result AFTER applying this Pull Request

No deprecated message anymore.

avatar joomdonation joomdonation - open - 21 Mar 2022
avatar joomdonation joomdonation - change - 21 Mar 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2022
Category Administration com_plugins
avatar laoneo
laoneo - comment - 21 Mar 2022

This is a duplicate of #37324 as it will be fixed there as well.

avatar laoneo
laoneo - comment - 21 Mar 2022

@joomdonation can you please close this one and test #37324? Thanks.

avatar joomdonation
joomdonation - comment - 21 Mar 2022

@laoneo As mentioned, it's alternative to your PR and I think it is better fix. Someone mentioned that we should not pass a null (or empty string) to $lang->hasKey method, I agree and that's the reason I made this PR. I will leave the PR here to get feedback from others to see what's the preferred way to solve the issue.

avatar anujaraj anujaraj - test_item - 21 Mar 2022 - Not tested
avatar Quy
Quy - comment - 22 Mar 2022

Someone mentioned that we should not pass a null (or empty string) to $lang->hasKey method, I agree and that's the reason I made this PR.

https://github.com/joomla/joomla-cms/pull/36355/files#r784864983

avatar RickR2H
RickR2H - comment - 22 Mar 2022

I have tested this item successfully on 05109d0


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

avatar RickR2H RickR2H - test_item - 22 Mar 2022 - Tested successfully
avatar ricardo1709
ricardo1709 - comment - 22 Mar 2022

I have tested this item successfully on 05109d0


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

avatar ricardo1709 ricardo1709 - test_item - 22 Mar 2022 - Tested successfully
avatar RickR2H RickR2H - change - 22 Mar 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 22 Mar 2022

RTC


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

avatar bembelimen bembelimen - change - 24 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-24 21:33:17
Closed_By bembelimen
Labels Added: ? ? PHP 8.x
avatar bembelimen bembelimen - close - 24 Mar 2022
avatar bembelimen bembelimen - merge - 24 Mar 2022
avatar bembelimen
bembelimen - comment - 24 Mar 2022

Thx

Add a Comment

Login with GitHub to post a comment