[4.1] [PHP 8.1] Compatibility of htmlentities() types in tinymce DisplayTrait#36846
Merged
bembelimen merged 4 commits intojoomla:4.1-devfrom Mar 24, 2022
Merged
[4.1] [PHP 8.1] Compatibility of htmlentities() types in tinymce DisplayTrait#36846bembelimen merged 4 commits intojoomla:4.1-devfrom
bembelimen merged 4 commits intojoomla:4.1-devfrom
Conversation
PhilETaylor
reviewed
Jan 25, 2022
… ENT_NOQUOTES. Thank you @PhilETaylor! Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
Contributor
|
Please fix conflicts. |
Contributor
|
I have tested this item ✅ successfully on 5356a79 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36846. |
1 similar comment
Member
|
I have tested this item ✅ successfully on 5356a79 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36846. |
Member
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36846. |
Contributor
|
Thx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue # none
Summary of Changes
This is the Joomla 4.1 identical correspondent pendent of the Joomla 3.10 PR #36804 that got merged, and replaces previous Joomla 4.0 PR #36761 that got outdated due to the cool refactoring of editors into Traits.
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
This is the result on 4.0 (in 4.1-dev, it's erroring on line 380 of DisplayTrait.php instead of line 538 of tinymce.php):
Expected result AFTER applying this Pull Request
No errors.
Documentation Changes Required
None.