? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
4 Jun 2020

Partial Pull Request for Issue #29414.

Summary of Changes

Fixes a notice on PHP 7.4 when uploading extension package fails.

Testing Instructions

  1. Install an extension package with size over upload_max_filesize limit. Check PHP error log.
  2. Try to install a random file, e.g. an image. Check Joomla's tmp directory.
  3. Install an extension with size under upload_max_filesize limit.

Expected result

  1. Installation aborted. No PHP notices.
  2. Installation aborted and uploaded file is removed from tmp directory.
  3. Extension installed successfully.

Actual result

  1. Installation aborted. PHP notice: Trying to access array offset on value of type bool in administrator\components\com_installer\models\install.php on line 178

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 4 Jun 2020
avatar SharkyKZ SharkyKZ - change - 4 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2020
Category Administration com_installer
avatar SharkyKZ SharkyKZ - change - 4 Jun 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 4 Jun 2020
avatar SharkyKZ SharkyKZ - change - 4 Jun 2020
Labels Added: ?
avatar richard67
richard67 - comment - 4 Jun 2020

@SharkyKZ For some reason I don't get the PHP notice of issue 1. with PHP 7.3. I get the correct red alert telling that maximum PHP file upload size is too small.

avatar SharkyKZ
SharkyKZ - comment - 4 Jun 2020

@richard67 The notice is not visible. You have to check PHP error log.

avatar richard67
richard67 - comment - 4 Jun 2020

@SharkyKZ I always check PHP error log and have error reporting set to maximum in the backend. In my php.ini file I have E_ALL & ~E_DEPRECATED & ~E_STRICT, and I have log_errors = On; in my php.ini and a path to a log file set, which I watch permanently when testing and which shows me all. But the notice mentioned here I did not see.

avatar richard67
richard67 - comment - 4 Jun 2020

@SharkyKZ Maybe it happens only with PHP 7.4?

avatar SharkyKZ
SharkyKZ - comment - 4 Jun 2020

@richard67 You're right. It's only on PHP 7.4+.

avatar SharkyKZ SharkyKZ - change - 4 Jun 2020
Title
Fix array offset notice when installing extensions
Fix array offset notice on PHP 7.4 when installing extensions
avatar SharkyKZ SharkyKZ - edited - 4 Jun 2020
avatar SharkyKZ SharkyKZ - change - 4 Jun 2020
The description was changed
avatar SharkyKZ SharkyKZ - edited - 4 Jun 2020
avatar richard67
richard67 - comment - 4 Jun 2020

@SharkyKZ Then I can't test it, sorry :-(
Code review looks good though.

avatar mbabker
mbabker - comment - 4 Jun 2020

Code change looks fine.

avatar laoneo laoneo - test_item - 5 Jun 2020 - Tested successfully
avatar laoneo
laoneo - comment - 5 Jun 2020

I have tested this item successfully on f850a21


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

avatar viocassel viocassel - test_item - 5 Jun 2020 - Tested successfully
avatar viocassel
viocassel - comment - 5 Jun 2020

I have tested this item successfully on f850a21


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

avatar richard67 richard67 - change - 5 Jun 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 5 Jun 2020

RTC


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

avatar wilsonge wilsonge - change - 15 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-15 21:40:08
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 15 Jun 2020
avatar wilsonge wilsonge - merge - 15 Jun 2020
avatar wilsonge
wilsonge - comment - 15 Jun 2020

Thanks!

Add a Comment

Login with GitHub to post a comment