User tests: Successful: Unsuccessful:
Pull Request for Issue #39719 and #39858.
Currently, if null is passed to FieldsHelper::extract method call, there will be deprecated warnings. This tiny PR just fixes that.
As this does not happen in the core, code review should be enough.
Warnings in some third party extensions when null is passed to the method call
No warnings anymore.
Please select:
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed
Category | ⇒ | Administration com_fields |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
@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
Looks like you are right as I was not reading the whole function doc block.
I have tested this item
code review
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Thanks for testing the PR. RTC !
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:
?
|
Thanks!
I would say, an empty array should be returned.