? ? PHP 8.x Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
16 Apr 2022

Pull Request for Issue #37567 .

Summary of Changes

The method getItem() returns an array but this is initialsed with "false".

Remark: It looks wrong that getItem() returns an array, but this is not in scope of this fix.

Testing Instructions

See #37567

Actual result BEFORE applying this Pull Request

Deprecation warning

Expected result AFTER applying this Pull Request

No deprecation warning

Documentation Changes Required

no

avatar chmst chmst - open - 16 Apr 2022
avatar chmst chmst - change - 16 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Apr 2022
Category com_tags Front End
avatar richard67
richard67 - comment - 16 Apr 2022

@chmst The issue which you have closed for this PR was not an issue but a PR, too. Maybe the issue tracker hasn’t shown that?

avatar chmst
chmst - comment - 16 Apr 2022

Not used to github on my IDE ;)

avatar chmst chmst - change - 16 Apr 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-04-16 11:00:58
Closed_By chmst
Labels Added: ? PHP 8.x
avatar chmst chmst - close - 16 Apr 2022
avatar frostmakk
frostmakk - comment - 16 Apr 2022

If this is a better solution than my PR just close mine, no problem.

avatar chmst
chmst - comment - 16 Apr 2022

Sorry ;) By chance I ad exactly the same code open when your PR appeared. I think your solution is better. Both resolve the deprecated warning.

avatar chmst chmst - change - 24 Apr 2022
Status Closed New
Closed_Date 2022-04-16 11:00:58
Closed_By chmst
avatar chmst chmst - change - 24 Apr 2022
Status New Pending
avatar chmst chmst - reopen - 24 Apr 2022
avatar laoneo
laoneo - comment - 24 Apr 2022

While this here is a correct fix, I'm wondering why it returns here

$this->item[] = ArrayHelper::toObject($properties, CMSObject::class);
an array with only one element that is again an array of properties. Should it not return just the array with properties?

avatar chmst
chmst - comment - 24 Apr 2022

I mentioned already that this method looks strange. A method getItem() should return an Item, not an array and have one integer as argument, not an array. This fix resolves only the php 8.1 warning,

avatar laoneo laoneo - change - 19 May 2022
Labels Added: Maintainers Checked
avatar joomdonation joomdonation - test_item - 26 May 2022 - Tested successfully
avatar joomdonation
joomdonation - comment - 26 May 2022

I have tested this item successfully on a105ac7


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

avatar alikon alikon - test_item - 27 May 2022 - Tested successfully
avatar alikon
alikon - comment - 27 May 2022

I have tested this item successfully on a105ac7


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

avatar alikon alikon - change - 27 May 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 27 May 2022

RTC


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

avatar laoneo laoneo - change - 3 Jun 2022
Labels Added: ?
avatar laoneo laoneo - change - 3 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-03 08:41:05
Closed_By laoneo
avatar laoneo laoneo - close - 3 Jun 2022
avatar laoneo laoneo - merge - 3 Jun 2022
avatar laoneo
laoneo - comment - 3 Jun 2022

Thanks!

Add a Comment

Login with GitHub to post a comment