[3.10] [PHP 8.1] compatibility of htmlentities types in tinymce.php (fixes Deprecated tinymce.php on line 603)#36804
Merged
zero-24 merged 1 commit intojoomla:3.10-devfrom Jan 23, 2022
Merged
Conversation
Fixes `Fixes `Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in libraries/src/Date/Date.php on line 112` error on login`
Contributor
|
Taking this in thanks @beat |
Contributor
Author
|
Thank you! Could you please also test-review and merge the corresponding Joomla 4 PR #36761 ? |
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
Fixes
Deprecated: htmlentities(): Passing null to parameter #2 ($flags) of type int is deprecated in plugins/editors/tinymce/tinymce.php on line 603Joomla 3.10 version of Joomla 4.0 #36761
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 with all errors on and joomla debug on on any tinymce window should show it too.
Actual result BEFORE applying this Pull Request
Deprecated: htmlentities(): Passing null to parameter #2 ($flags) of type int is deprecated in plugins/editors/tinymce/tinymce.php on line 603Expected result AFTER applying this Pull Request
No errors.
Documentation Changes Required
None.