PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Artist-Matrix
Artist-Matrix
20 Apr 2024

Joomla v4.4.4
PHP v8.2.17

// Got error 'PHP message: PHP Warning: preg_match(): Compilation failed: missing closing parenthesis at offset 13 in /libraries/src/Updater/Adapter/ExtensionAdapter.php on line 110'

Summary of Changes

Added preg_quote to the regex pattern of the version check at line 110

Testing Instructions

Don't know exactly which extension cause this issue, but it happens when the extension update check is triggered from the backend

Actual result BEFORE applying this Pull Request

the above PHP warning occurs

Expected result AFTER applying this Pull Request

The warning is gone

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Artist-Matrix Artist-Matrix - open - 20 Apr 2024
avatar Artist-Matrix Artist-Matrix - change - 20 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2024
Category Libraries
avatar Artist-Matrix Artist-Matrix - change - 20 Apr 2024
Title
Update ExtensionAdapter.php due to PHP Warning
[J4.4.4] Update ExtensionAdapter.php due to PHP Warning
avatar Artist-Matrix Artist-Matrix - edited - 20 Apr 2024
avatar Artist-Matrix Artist-Matrix - change - 20 Apr 2024
Title
[J4.4.4] Update ExtensionAdapter.php due to PHP Warning
[4.4.4] Update ExtensionAdapter.php due to PHP Warning
avatar Artist-Matrix Artist-Matrix - edited - 20 Apr 2024
avatar richard67
richard67 - comment - 20 Apr 2024

@Artist-Matrix I think this is the wrong fix. As you can see here in the docs for a single update entity, the targetplatform can be a regular expression. If you now use preg_quote, special characters will be escaped, see here in the PHP docs: https://www.php.net/manual/en/function.preg-quote.php . This will cause targetplatform values using regular expression to fail.

avatar Artist-Matrix Artist-Matrix - change - 20 Apr 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-04-20 11:31:25
Closed_By Artist-Matrix
Labels Added: PR-4.4-dev
avatar Artist-Matrix Artist-Matrix - close - 20 Apr 2024

Add a Comment

Login with GitHub to post a comment