? Pending

User tests: Successful: Unsuccessful:

avatar N6REJ
N6REJ
8 Oct 2022

Pull Request for Issue # .

Summary of Changes

Removes the deprecation warning when fetching data with patch_tester

Testing Instructions

install https://github.com/joomla-extensions/patchtester/releases/tag/4.2.1
enter your credentials and apply this patch.
Now fetch your data.
a box will pop up with several errors.

Actual result BEFORE applying this Pull Request

An error has occurred while fetching the data from GitHub.

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in E:\Bearsampp\www\j4\libraries\src\MVC\Model\ListModel.php on line 543

Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in E:\Bearsampp\www\j4\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 24

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in E:\Bearsampp\www\j4\libraries\src\HTML\Helpers\StringHelper.php on line 132
{"success":true,"message":"Processing page 2 of 3 pages of GitHub data","messages":null,"data":{"complete":false,"page":2,"lastPage":3}}

Expected result AFTER applying this Pull Request

image
Notice warning is gone.

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

avatar N6REJ N6REJ - open - 8 Oct 2022
avatar N6REJ N6REJ - change - 8 Oct 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Oct 2022
Category Libraries
avatar N6REJ N6REJ - change - 8 Oct 2022
Labels Added: ?
avatar toivo
toivo - comment - 9 Oct 2022

In my Wampserver and PHP 8.1.9 test site both 4.2.3 and 4.2.4-dev of 30 September (the latest Nightly Build - just reported the anomaly in Prod Dept Glip) reported only the error addressed in #38917:
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla42\libraries\src\MVC\Model\ListModel.php on line 543


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38918.
avatar N6REJ
N6REJ - comment - 9 Oct 2022

@toivo there are 3 errors generated. Each have their own pr's.

avatar N6REJ
N6REJ - comment - 17 Oct 2022

@toivo can you please test and make sure the str_replace error is gone

avatar toivo
toivo - comment - 18 Oct 2022

@toivo can you please test and make sure the str_replace error is gone

I had to edit the two lines in StringHelper.php manually because of the PatchTester error. It did not help, the error is still displayed at the top of PatchTester and before any list of PRs is retrieved:
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\libraries\src\MVC\Model\ListModel.php on line 543

The test environment was was Joomla 4.2.4-dev updated from Nightly Builds of 10 October, the latest available. Apprently there will be a sprint to fix the issues, including the fault stopping the Nightly Builds from being released

avatar N6REJ
N6REJ - comment - 18 Oct 2022

@toivo you shouldn't have to replace anything. I think your getting confused. There are 3 errors currently. This pr address ONLY the str_replace error.

avatar toivo
toivo - comment - 18 Oct 2022

@toivo you shouldn't have to replace anything. I think your getting confused. There are 3 errors currently. This pr address ONLY the str_replace error.

I am not confused at all. The bug stops the Patch Tester from working if Error Reporting is set to 'Maximum'. That is why I edited the file manually. Now I changed Error Reporting to 'Simple' to filter Deprecated messages, ran Patch Tester and applied the PR, then changed Error Reporting back to 'Maximum'. Tried to run the Patch Tester and the same error occurs in line 543:
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\libraries\src\MVC\Model\ListModel.php on line 543

avatar N6REJ
N6REJ - comment - 18 Oct 2022

@toivo 543 is not the error this patch fixes...

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in E:\Bearsampp\www\j4\libraries\src\HTML\Helpers\StringHelper.php on line 132
{"success":true,"message":"Processing page 2 of 3 pages of GitHub data","messages":null,"data":{"complete":false,"page":2,"lastPage":3}}

is the error.

avatar toivo
toivo - comment - 18 Oct 2022

@N6REJ, the str_replace error did not come up in my test before the PR was applied. Your test environment must somehow be different. Sorry, I did not read the description and thought that this PR was fixing strtoupper() in line 543 as well.


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

avatar N6REJ N6REJ - change - 13 Nov 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-11-13 21:54:29
Closed_By N6REJ
avatar N6REJ N6REJ - close - 13 Nov 2022

Add a Comment

Login with GitHub to post a comment