? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
15 Feb 2023

Pull Request for Issue #39719 and #39858.

Summary of Changes

Currently, if null is passed to FieldsHelper::extract method call, there will be deprecated warnings. This tiny PR just fixes that.

Testing Instructions

As this does not happen in the core, code review should be enough.

Actual result BEFORE applying this Pull Request

Warnings in some third party extensions when null is passed to the method call

Expected result AFTER applying this Pull Request

No warnings anymore.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 15 Feb 2023
Category Administration com_fields
avatar joomdonation joomdonation - open - 15 Feb 2023
avatar joomdonation joomdonation - change - 15 Feb 2023
Status New Pending
avatar joomdonation joomdonation - change - 15 Feb 2023
Labels Added: ?
avatar laoneo
laoneo - comment - 15 Feb 2023

I would say, an empty array should be returned.

avatar joomdonation
joomdonation - comment - 15 Feb 2023

@laoneo Return null makes it behaves in the same way when the $contextString is not in expected format as you implemented here https://github.com/joomla/joomla-cms/blob/4.2-dev/administrator/components/com_fields/src/Helper/FieldsHelper.php#L62 . Any reasons why you want to return empty array? The doc block also states that it returns array or null here https://github.com/joomla/joomla-cms/blob/4.2-dev/administrator/components/com_fields/src/Helper/FieldsHelper.php#L53

avatar laoneo
laoneo - comment - 15 Feb 2023

Looks like you are right as I was not reading the whole function doc block.

avatar alikon alikon - test_item - 18 Feb 2023 - Tested successfully
avatar alikon
alikon - comment - 18 Feb 2023

I have tested this item successfully on 65f829c

code review


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

avatar viocassel viocassel - test_item - 18 Feb 2023 - Tested successfully
avatar viocassel
viocassel - comment - 18 Feb 2023

I have tested this item successfully on 65f829c


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

avatar joomdonation joomdonation - change - 18 Feb 2023
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 19 Feb 2023

Thanks for testing the PR. RTC !


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

avatar laoneo laoneo - close - 20 Feb 2023
avatar laoneo laoneo - merge - 20 Feb 2023
avatar laoneo laoneo - change - 20 Feb 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-02-20 09:58:02
Closed_By laoneo
Labels Added: ?
avatar laoneo
laoneo - comment - 20 Feb 2023

Thanks!

Add a Comment

Login with GitHub to post a comment