? ? PHP 8.x Pending

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
15 Jan 2022

Summary of Changes

When installing a module on PHP 8.1 the following notice is observed in the Network Inspector:
base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated

When the base64 issue is solved you get another notice:
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

This happens because there is no return value in the POST request. Not having the return value is absolutely fine but we need to check if it has a value.

This PR fixes that.

Testing Instructions

  1. Make sure you are running PHP 8.1
  2. In the Global Settings set the Error Reporting to maximum
  3. Go to System -> Install -> Extensions
  4. Open the Developer Tools of the browser
  5. Click on the Network tab
  6. Install the attached module
    mod_test.zip
  7. You should see this error
    image
  8. In the Network tab click on the request that just happened
  9. Click on the Response tab
  10. You will see the notice there. If you do not see the notice, you may need to toggle the Raw button
  11. Apply the patch
  12. Install the module again
  13. Click on the Response tab
  14. You will see no notice here

Actual result BEFORE applying this Pull Request

An error is shown due to 8.1 compatibility

Expected result AFTER applying this Pull Request

The 8.1 compatibility is solved.

Documentation Changes Required

None

avatar roland-d roland-d - open - 15 Jan 2022
avatar roland-d roland-d - change - 15 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jan 2022
Category Administration com_installer
avatar roland-d roland-d - change - 15 Jan 2022
Labels Added: ?
avatar roland-d roland-d - change - 15 Jan 2022
The description was changed
avatar roland-d roland-d - edited - 15 Jan 2022
avatar chmst chmst - change - 31 Jan 2022
Labels Added: ?
avatar laoneo laoneo - change - 20 Mar 2022
Labels Added: ? PHP 8.x
Removed: ? ?
avatar Fedik Fedik - test_item - 3 Jun 2022 - Tested successfully
avatar Fedik
Fedik - comment - 3 Jun 2022

I have tested this item successfully on 574fd8e


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

avatar martin-zw martin-zw - test_item - 3 Jun 2022 - Tested successfully
avatar martin-zw
martin-zw - comment - 3 Jun 2022

I have tested this item successfully on 574fd8e


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

avatar Quy Quy - change - 3 Jun 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 3 Jun 2022

RTC


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

avatar laoneo laoneo - change - 3 Jun 2022
Labels Added: ?
avatar laoneo laoneo - change - 3 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-03 21:09:42
Closed_By laoneo
avatar laoneo laoneo - close - 3 Jun 2022
avatar laoneo laoneo - merge - 3 Jun 2022
avatar laoneo
laoneo - comment - 3 Jun 2022

Thanks!

Add a Comment

Login with GitHub to post a comment