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

Backport Fix PHP 8.2 warnings by casting trim() argument to string #31693

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

uvaldenaire-opendsi
Copy link
Contributor

Backport of #28162

…olibarr#28162)

In create and update methods of societe class, the trim function triggered warnings when the argument passed is null.
Cast string properties to string to avoid php warnings when the property is null.
@rycks rycks added the Pending analysis of PR (maintenance team) PR is in a maintenance branch with several approvers. Waiting approval of all of them. label Nov 7, 2024
Copy link
Contributor

@rycks rycks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me

@hregis
Copy link
Contributor

hregis commented Nov 7, 2024

@uvaldenaire-opendsi

(string) trim(xxxxx)

Is different of

trim((string) xxxx))

?

@uvaldenaire-opendsi
Copy link
Contributor Author

@hregis
(string) trim(xxxxx) when xxxxx is null will throw a deprecated warning.
trim((string) xxxx)) when xxxx is null won't throw a deprecated warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending analysis of PR (maintenance team) PR is in a maintenance branch with several approvers. Waiting approval of all of them.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants