? ? Pending

User tests: Successful: Unsuccessful:

avatar MacJoom
MacJoom
23 Oct 2022

Pull Request for Deprecated message in Joomla Patch Tester

Summary of Changes

Avoid deprecated message

Testing Instructions

Install Joomla Patch Tester

PHP 8.1
Turn on all PHP Warnings
display_errors = On
error_reporting = E_ALL | E_STRICT

Actual result BEFORE applying this Pull Request

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client2/web14/web/joomla-cms/libraries/src/MVC/Model/ListModel.php on line 543

Disturbs 'Fetch Data' in popup window too.

Expected result AFTER applying this Pull Request

No warning

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 MacJoom MacJoom - open - 23 Oct 2022
avatar MacJoom MacJoom - change - 23 Oct 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Oct 2022
Category Libraries
avatar MacJoom MacJoom - change - 23 Oct 2022
Labels Added: ?
avatar toivo
toivo - comment - 24 Oct 2022

I have tested this item successfully on bb1ffff

Tested successfully in Joomla 4.2.4-dev of 24 October in Wampserver using PHP 8.1.10


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

avatar toivo toivo - test_item - 24 Oct 2022 - Tested successfully
avatar viocassel
viocassel - comment - 25 Oct 2022

I have tested this item successfully on bb1ffff


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

avatar viocassel viocassel - test_item - 25 Oct 2022 - Tested successfully
avatar richard67 richard67 - change - 27 Oct 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 27 Oct 2022

RTC


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

avatar laoneo laoneo - change - 27 Oct 2022
Labels Added: ?
avatar zero-24
zero-24 - comment - 27 Oct 2022

To me this is the wrong solution for this problem.. When this is an issue only with the patchtester it should be patched in the patchtester.. When its a general problem it should be fixed for all cases not only this specific case.. Please do not merge this as it is right now.

avatar richard67
richard67 - comment - 27 Oct 2022

To me this is the wrong solution for this problem.. When this is an issue only with the patchtester it should be patched in the patchtester.. When its a general problem it should be fixed for all cases not only this specific case.. Please do not merge this as it is right now.

I think it could be a general issue because the ordering direction might not be always set. But I might be wrong of course.

avatar laoneo
laoneo - comment - 27 Oct 2022

I have the same issue in DPCalendar. For years we could pass NULL as ordering, why should it all of the sudden fail. This should be fixed here and not on every extension.

avatar brianteeman
brianteeman - comment - 27 Oct 2022

The title of the pr should be updated to reflect what it actually is for.

avatar laoneo laoneo - change - 27 Oct 2022
Title
Patch Tester: Deprecated message in libraries/src/MVC/Model/ListModel.php
Do not show a deprecated message when no ordering is set in back end list views
avatar laoneo laoneo - edited - 27 Oct 2022
avatar laoneo
laoneo - comment - 27 Oct 2022

Done.

avatar zero-24
zero-24 - comment - 27 Oct 2022

I have the same issue in DPCalendar. For years we could pass NULL as ordering, why should it all of the sudden fail. This should be fixed here and not on every extension.

It has been changed by PHP not us, so to me its a clear php combat patch of the one who is doing the no longer allowed call. When it would be patched here we should fix it for all cases in this method not just that single case that where hit by patchtester or dpcalendar.

I personally dont like us adding to all methods an is_null check as thats sound very wrong to me and is a lot of code which is avoidable but when we want this to be fixed in the Core code we should not only fix it for this sub-case but all affected places in this method.

avatar HLeithner
HLeithner - comment - 28 Oct 2022

I personally dont like us adding to all methods an is_null check as thats sound very wrong to me and is a lot of code which is avoidable but when we want this to be fixed in the Core code we should not only fix it for this sub-case but all affected places in this method.

In theory you are right but this case is diffrent because the input hasn't been provided thru a mechanism which is (or can be) automatically validated by php.
The programmer provides us an ARRAY with information, and we should (have to) validate this input, in this case it's even worse because we don't validate user input (getUserStateFromRequest).

So it's perfectly fine for us to check if the provided parameters are right.

@MacJoom thanks

avatar HLeithner HLeithner - close - 28 Oct 2022
avatar HLeithner HLeithner - merge - 28 Oct 2022
avatar HLeithner HLeithner - change - 28 Oct 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-10-28 07:47:33
Closed_By HLeithner
avatar richard67
richard67 - comment - 28 Oct 2022

Thanks @HLeithner .

Add a Comment

Login with GitHub to post a comment