? ? Pending

User tests: Successful: Unsuccessful:

avatar Quy
Quy
1 Mar 2019

Pull Request for Issue #23999, #24039

Thanks @ReLater for the fix.

Summary of Changes

Cast the value to an array.

Testing Instructions

Install test demo.
On the frontend, click All Tags.
Click Lime.
Click Feed Entries.
Check PHP error log to see warning and notices.

Actual result

PHP Warning: Invalid argument supplied for foreach() in \components\com_tags\views\tag\view.feed.php on line 35
PHP Notice: Undefined index: id in \components\com_tags\router.php on line 79
PHP Notice: Undefined index: id in \components\com_tags\router.php on line 84
PHP Notice: Undefined index: id in \components\com_tags\router.php on line 84

avatar Quy Quy - open - 1 Mar 2019
avatar Quy Quy - change - 1 Mar 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Mar 2019
Category com_tags Front End
avatar Quy Quy - change - 1 Mar 2019
The description was changed
avatar Quy Quy - edited - 1 Mar 2019
avatar Quy Quy - change - 1 Mar 2019
Labels Added: ?
avatar SharkyKZ SharkyKZ - test_item - 1 Mar 2019 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 1 Mar 2019

I have tested this item successfully on 8a29d6a


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

avatar SharkyKZ
SharkyKZ - comment - 1 Mar 2019

I have tested this item successfully on 8a29d6a


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

avatar ReLater
ReLater - comment - 1 Mar 2019
`$app->input->get('id', array(), 'array');`

If you are sure that id always has a value (I don't know if we can rely on it here) then that's OK but if id is empty you get an array wit 1 element without value

Array([0] =>)

instead of an empty array (array) $app->input->get('id');

Array();

avatar SharkyKZ
SharkyKZ - comment - 1 Mar 2019

@ReLater Can you double check that? Array filter simply casts the value as array so the result should be exactly the same.

avatar ReLater
ReLater - comment - 1 Mar 2019

I don't remember where I have tested that scenario, feed or html URLs, with or without SEF ..., and can't reproduce it at the moment. All I know is that I used (array) consciously. I "striked" my comment. Time will tell.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Mar 2019

@dioubernardo please Test as this Issue was reported by you too.

avatar Quy
Quy - comment - 6 Mar 2019

@wlh1950 Please test. Thanks.

avatar alikon alikon - test_item - 6 Mar 2019 - Tested successfully
avatar alikon
alikon - comment - 6 Mar 2019

I have tested this item successfully on 8a29d6a


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

avatar Quy Quy - change - 6 Mar 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 6 Mar 2019

RTC


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

avatar Quy
Quy - comment - 6 Mar 2019

RTC


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

avatar alikon
alikon - comment - 6 Mar 2019

@Quy i'm afraid you shouldn't test your own pr , it is supposed you already have done it ?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Mar 2019

@alikon tests are by you and @SharkyKZ

avatar alikon
alikon - comment - 7 Mar 2019

@franz-wohl koenig i'm sorry i was watching something else, just ignore

avatar HLeithner HLeithner - change - 7 Mar 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-03-07 08:40:35
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 7 Mar 2019
avatar HLeithner HLeithner - merge - 7 Mar 2019
avatar HLeithner
HLeithner - comment - 7 Mar 2019

thx

Add a Comment

Login with GitHub to post a comment