Skip to content

[4.1] PHP 8.1 Deprecation warning TagModel#37567

Closed
frostmakk wants to merge 2 commits intojoomla:4.1-devfrom
frostmakk:PHP81-Tags
Closed

[4.1] PHP 8.1 Deprecation warning TagModel#37567
frostmakk wants to merge 2 commits intojoomla:4.1-devfrom
frostmakk:PHP81-Tags

Conversation

@frostmakk
Copy link
Copy Markdown
Contributor

@frostmakk frostmakk commented Apr 16, 2022

Testing Instructions

Install 4.1 with sample data.
Run on PHP 8.1 with maximum error reporting.
Go to front end and click on a tag.

Actual result BEFORE applying this Pull Request

PHP Deprecated: Automatic conversion of false to array is deprecated in ..\components\com_tags\src\Model\TagModel.php on line 318

Expected result AFTER applying this Pull Request

No deprecation warning from TagModel

Documentation Changes Required

@chmst
Copy link
Copy Markdown
Contributor

chmst commented Apr 16, 2022

Closing. Please test #37568

@chmst chmst closed this Apr 16, 2022
@chmst chmst reopened this Apr 16, 2022
@Quy Quy added the PHP 8.x PHP 8.x deprecated issues label Apr 16, 2022
@richard67 richard67 added the PBF Pizza, Bugs and Fun label Apr 22, 2022
@kiki-G
Copy link
Copy Markdown

kiki-G commented Apr 22, 2022

I have tested this item ✅ successfully on 189d60f


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

2 similar comments
@kiki-G
Copy link
Copy Markdown

kiki-G commented Apr 22, 2022

I have tested this item ✅ successfully on 189d60f


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

@RickR2H
Copy link
Copy Markdown
Member

RickR2H commented Apr 22, 2022

I have tested this item ✅ successfully on 189d60f


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

@joomla-cms-bot joomla-cms-bot removed PBF Pizza, Bugs and Fun PHP 8.x PHP 8.x deprecated issues labels Apr 22, 2022
@RickR2H
Copy link
Copy Markdown
Member

RickR2H commented Apr 22, 2022

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 22, 2022
@RickR2H RickR2H added PBF Pizza, Bugs and Fun Maintainers Checked Used if the PR is conceptional useful labels Apr 22, 2022
@kiki-G
Copy link
Copy Markdown

kiki-G commented Apr 22, 2022

I have tested this item ✅ successfully on 189d60f


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

@richard67 richard67 added PHP 8.x PHP 8.x deprecated issues and removed Maintainers Checked Used if the PR is conceptional useful labels Apr 23, 2022
@laoneo
Copy link
Copy Markdown
Member

laoneo commented Apr 23, 2022

The correct way is the fix from #37568 as the item needs to be an array as you can see here

$this->item[] = ArrayHelper::toObject($properties, CMSObject::class);
. So the item needs to be initialized as array. and returned as array.

@laoneo laoneo added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Apr 24, 2022
@frostmakk
Copy link
Copy Markdown
Contributor Author

@chmst
Closing in favor of #37568

@frostmakk frostmakk closed this Apr 24, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 24, 2022
@frostmakk frostmakk deleted the PHP81-Tags branch April 24, 2022 14:13
@richard67 richard67 removed the PBF Pizza, Bugs and Fun label Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP 8.x PHP 8.x deprecated issues Updates Requested Indicates that this pull request needs an update from the author and should not be tested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants