Skip to content

Conversation

stollr
Copy link
Contributor

@stollr stollr commented Apr 16, 2025

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
License MIT

What's in this PR?

In the UserManager's processEmail method I have added a check for null-ness of the user's email before it is passed to PHP's strcasecmp function.

Additionally I added two unit test to test the UserManager's save method.

Why?

strcasecmp does not accept parameter values of type NULL. Passing NULL to non-nullable parameters of built-in functions was deprecated in PHP 8.1 (see here).

@stollr stollr force-pushed the fix_null_arg_depr branch from 440a1b3 to 1a6a983 Compare April 17, 2025 06:33
@stollr stollr changed the title Fixed passing null to non-nullable argument in UserManager Fix passing null to non-nullable argument in UserManager Apr 17, 2025
@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Apr 18, 2025
@stollr stollr force-pushed the fix_null_arg_depr branch from 142774b to 46e42f5 Compare April 18, 2025 15:11
@stollr stollr force-pushed the fix_null_arg_depr branch from 46e42f5 to b22e9e5 Compare April 18, 2025 15:34
@stollr
Copy link
Contributor Author

stollr commented Apr 18, 2025

@alexander-schranz I have commited your suggestion

@alexander-schranz alexander-schranz merged commit 5100cd3 into sulu:2.5 May 8, 2025
8 of 9 checks passed
@alexander-schranz
Copy link
Member

@stollr thank you!

@stollr stollr deleted the fix_null_arg_depr branch May 8, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants