Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4] cannot pass null to trim function in php 8.1 #36281

Merged
merged 2 commits into from
Dec 11, 2021
Merged

[4] cannot pass null to trim function in php 8.1 #36281

merged 2 commits into from
Dec 11, 2021

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Dec 10, 2021

Pull Request for Issue # .

Summary of Changes

set a default value

Testing Instructions

open admin

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

no Exception

@HLeithner
Copy link
Member

please stop adding ?? '' blindly everywhere you seeing this error.

For example in this case we take the variable 2 lines above, so being sure that a string is returned should bin in this line.

Beside that trim($xxx ?? ''); looks ugly and doesn't explain why we expect an empty variable at this point in the code. Please a proper if statement above and explain with a comment why it could be NULL (if it's not logical)

@alikon
Copy link
Contributor Author

alikon commented Dec 10, 2021

sound better now ?

@HLeithner
Copy link
Member

thanks

@Krshivam25
Copy link
Contributor

I have tested this item ✅ successfully on fb7a29d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36281.

1 similar comment
@xillibit
Copy link
Contributor

I have tested this item ✅ successfully on fb7a29d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36281.

@Quy
Copy link
Contributor

Quy commented Dec 10, 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36281.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 10, 2021
@wilsonge wilsonge merged commit 3afb594 into joomla:4.0-dev Dec 11, 2021
@wilsonge
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 11, 2021
@Quy Quy added this to the Joomla 4.0.5 milestone Dec 11, 2021
@alikon alikon deleted the patch-2 branch December 12, 2021 06:35
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.

7 participants