[4.1] [PHP 8.1] compatibility of htmlentities types in tinymce.php (fixes Deprecated tinymce.php on line 538)#36761
[4.1] [PHP 8.1] compatibility of htmlentities types in tinymce.php (fixes Deprecated tinymce.php on line 538)#36761beat wants to merge 1 commit intojoomla:4.1-devfrom
Conversation
…fixes Deprecated tinymce.php on line 603) Fixes `Deprecated: htmlentities(): Passing null to parameter #2 ($flags) of type int is deprecated in plugins/editors/tinymce/tinymce.php on line 603` Joomla 3.10 version of Joomla 4.0 joomla#36761
|
In theory you dont need to create this as it will be merged up from 3.x |
|
This is the Joomla 4.0 identical pendent of this Joomla 3.10 PR #36804 (had wrong title, fixed) that got merged. |
Nice! Good to know for all my other 3.10 PRs that just got merged. Then in practice this PR might still help as the tinymce.php code changed quite a bit, So, keeping it open. Of course, in case the corresponding #36804 Joomla 3.10 PR gets adapted and merged into 4.x-dev branches, feel free to comment commit # and close this PR. |
|
As brian said that should be fixed on the merge up and when we merge here it results into conflicts. So i would like to hear @bembelimen 's opinion first whether he wants to merge here or merge 3.10 into 4.0/4.1 first. My proposal would be the latter once merged up we can check whether this PR is still needed. |
Pull Request for Issue # : None, found and fixed it directly here.
Summary of Changes
This is the Joomla 4.0 identical pendent of this Joomla 3.10 PR #36804 that got merged.
In PHP,
htmlentities()has following parameters types: 2nd is a non-null int, 4th is à non-null bool.ref.: https://www.php.net/manual/en/function.htmlentities.php
This PR does replace null by their type-conversions: (int) null -> 0, and (bool) null -> false.
Disclaimer: I'm only fixing PHP 8.1 compatibility here.
Testing Instructions
A code-review should be enough here.
I found it with CB internal PMS / New Message, but I guess PHP 8.1 on any tinymce window should show it too.
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
No errors.
Documentation Changes Required
None.