Skip to content

[2.0] [PHP 8.1] Fix deprecated null parameter for string functions in the escape method of the drivers#260

Merged
nibra merged 1 commit intojoomla-framework:2.0-devfrom
richard67:2.0-dev-php-8.1-fixes-2022-01-22
Jan 22, 2022
Merged

[2.0] [PHP 8.1] Fix deprecated null parameter for string functions in the escape method of the drivers#260
nibra merged 1 commit intojoomla-framework:2.0-devfrom
richard67:2.0-dev-php-8.1-fixes-2022-01-22

Conversation

@richard67
Copy link
Copy Markdown
Contributor

@richard67 richard67 commented Jan 22, 2022

Pull Request for Issue #

Summary of Changes

Analogue to PR joomla/joomla-cms#36787 for the 3.10-dev branch of the CMS.

Testing Instructions

A code review could be sufficient. Otherwise see joomla/joomla-cms#36787 .

Additional comments

Reading the code I think the return value should be type casted to sting also for the is_int($text) case a bit above the is_float($text) modified here. (There is no PHP 8.1 error at that place but it would be right due to the function documentation).

But that would change behaviour regarding the return value's type in that case, and so I think this should be done with a future clean-up, together with type-hinting the methods.

Documentation Changes Required

None.

@richard67
Copy link
Copy Markdown
Contributor Author

Should I make an analogue PR for the 1.0-dev branch?

@nibra nibra merged commit abebb07 into joomla-framework:2.0-dev Jan 22, 2022
@richard67 richard67 deleted the 2.0-dev-php-8.1-fixes-2022-01-22 branch January 22, 2022 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants