? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
14 Apr 2020

Pull Request for Issue #28682 .

See also #28614 (comment).

Summary of Changes

The getUpdatedFiles routine in file plugins/installer/override/override.php reads 2 filelists (before and after event) which should be arrays from session data into 2 variables and does only something if they have the same count of elements and there are differences in the elements. If so, it returns an arry with the different elements, otherwise it returns an empty array.

But there is no check if the file list has been ever stored in the session, i.e. if what is read from the session is an arry or not. This makes it fail with the PHP Warning mentioned in issue #28682 when updating Joomla 3.10 to 4.

The fix is to do nothing and return an empy array if one of the values read back from the session is not an array, like it would be if they had different count.

Testing Instructions

Code review should be sufficient.

But if you want to do a real test:

Test 1: Reproduce the issue

  1. Make sure you can see PHP warnings in a log file by setting error reporting and error log in the right way in your PHP settings.

  2. Update a 3.0-dev or current 3.10 nightly build to the latest 4.0-dev nigthly.

  1. At the end of the update, when loging in to the backend, watch the PHP or the webserver log (wherever your PHP logs errors to).

Result: See section "Actual result" below.

Test 2: Check that this PR solves it.

Repeat "Test 1: Reproduce the issue", but this time use the patched update package built for this PR.

Result: See section "Expected result" below.

Expected result

No PHP warning as mentioned in issue #28682 .

Actual result

PHP warning as mentioned in issue #28682 .

Documentation Changes Required

None.

avatar richard67 richard67 - open - 14 Apr 2020
avatar richard67 richard67 - change - 14 Apr 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Apr 2020
Category Front End Plugins
avatar richard67 richard67 - change - 14 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 14 Apr 2020
avatar richard67 richard67 - change - 14 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 14 Apr 2020
avatar richard67 richard67 - change - 14 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 14 Apr 2020
avatar richard67 richard67 - change - 14 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 14 Apr 2020
avatar Quy
Quy - comment - 14 Apr 2020

I have tested this item successfully on 1ac8bde


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

avatar Quy Quy - test_item - 14 Apr 2020 - Tested successfully
avatar richard67 richard67 - change - 14 Apr 2020
Labels Added: ?
avatar richard67 richard67 - alter_testresult - 14 Apr 2020 - Quy: Tested successfully
avatar richard67
richard67 - comment - 14 Apr 2020

Last merge was just a clean update to the base branch to make the system tests pass, so @Quy 's test is still valid.

avatar richard67 richard67 - change - 14 Apr 2020
The description was changed
avatar richard67 richard67 - edited - 14 Apr 2020
avatar jwaisner
jwaisner - comment - 14 Apr 2020

I have tested this item successfully on fd9bc63

Followed test instructions. No issues and php error does not exist.


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

avatar jwaisner jwaisner - test_item - 14 Apr 2020 - Tested successfully
avatar jwaisner jwaisner - change - 14 Apr 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 14 Apr 2020

RTC


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

avatar wilsonge wilsonge - change - 17 Apr 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-04-17 00:09:08
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 17 Apr 2020
avatar wilsonge wilsonge - merge - 17 Apr 2020
avatar wilsonge
wilsonge - comment - 17 Apr 2020

Thanks!

Add a Comment

Login with GitHub to post a comment