? Pending

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
22 Aug 2016

Pull Request for Issue # .

Summary of Changes

Basically, check that we actually got a list of files before trying to work on it as an array.
JFolder::files() may return false in some cases. So we need to check that before using its response as an array.

Testing Instructions

To expose the error, I guess you need to install an extension whose manifest file specifies a schemapath which does not exist. So, yes, this bug only really shows up when the extension to be installed has something wrong with it. What will happen is that JFolder::files() will return false which is passed to str_replace. I'm not sure what gets returned at that point but it's definitely not an array as expected. That return value will be passed to usort, count, foreach, and end as if it were an array. These will generate warnings.

After applying this fix, the function should exit when JFolder::files() return false or empty array. No warnings.

Documentation Changes Required

Nope.

avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2016
Category Libraries
avatar okonomiyaki3000 okonomiyaki3000 - open - 22 Aug 2016
avatar okonomiyaki3000 okonomiyaki3000 - change - 22 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2016
Labels Added: ?
avatar okonomiyaki3000 okonomiyaki3000 - change - 29 May 2017
The description was changed
avatar zero-24 zero-24 - test_item - 23 Jul 2017 - Tested successfully
avatar zero-24
zero-24 - comment - 23 Jul 2017

I have tested this item successfully on 69223ed


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

@okonomiyaki3000 can you please solve conflicting Files?

avatar Quy
Quy - comment - 22 Apr 2018

I have tested this item successfully on adc9cce


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

avatar Quy Quy - test_item - 22 Apr 2018 - Tested successfully
avatar Quy Quy - change - 22 Apr 2018
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 22 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - edited - 22 Apr 2018
avatar Quy
Quy - comment - 22 Apr 2018

RTC


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

avatar mbabker mbabker - change - 29 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-29 14:50:57
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 29 Apr 2018
avatar mbabker mbabker - merge - 29 Apr 2018

Add a Comment

Login with GitHub to post a comment