-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix array offset notice on PHP 7.4 when installing extensions #29416
Conversation
@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. |
@richard67 The notice is not visible. You have to check PHP error log. |
@SharkyKZ I always check PHP error log and have error reporting set to maximum in the backend. In my php.ini file I have |
@SharkyKZ Maybe it happens only with PHP 7.4? |
@richard67 You're right. It's only on PHP 7.4+. |
@SharkyKZ Then I can't test it, sorry :-( |
Code change looks fine. |
@@ -135,6 +135,14 @@ public function install() | |||
return false; | |||
} | |||
|
|||
// Check if package was uploaded successfully. | |||
if (!\is_array($package)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove here the \ to be consistent with the rest of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst consistency is definitely largely good for totally selfish reasons this will make my life easier merging to J4 😅 so merging as it is
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. |
1 similar comment
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. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29416. |
Thanks! |
…joomla#29416)" This reverts commit 028f66b.
…joomla#29416)" This reverts commit 028f66b.
…tensions (joomla#29416)"" This reverts commit 4c3bca1.
Partial Pull Request for Issue #29414.
Summary of Changes
Fixes a notice on PHP 7.4 when uploading extension package fails.
Testing Instructions
upload_max_filesize
limit. Check PHP error log.upload_max_filesize
limit.Expected result
Actual result
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.