Repository navigation
fix: accept null in User::setEMailAddress() and setDisplayName() - #41897
Open
openefaadmin wants to merge 2 commits into
Open
openefaadmin wants to merge 2 commits into
openefaadmin wants to merge 2 commits into
Conversation
setEMailAddress() is documented as `@param string|null` (null removes the address), but calls trim($mailAddress) directly, which raises "Passing null to parameter owncloud#1 ($string) of type string is deprecated" on PHP >= 8.1. Coalesce to '' before trimming - trim(null) already returned '' - so behaviour is unchanged. setDisplayName() gets the same guard. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Scott Barbour <[email protected]>
openefaadmin
force-pushed
the
fix/user-null-display-name-email
branch
from
October 7, 2026 17:05
5a41b5f to
d51d63a
Compare
Adjust changelog to have a shorter title and less detailed text. Signed-off-by: Phillip Davis <[email protected]>
Contributor
|
I adjust the changelog to have:
|
Author
|
Thanks Phil - makes sense. I'll keep changelog entries short and
admin-focused going forward.
|
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.
setEMailAddress() is documented as
@param string|null(null removes theaddress), but calls trim($mailAddress) directly, which raises
"Passing null to parameter #1 ($string) of type string is deprecated" on
PHP >= 8.1. Coalesce to '' before trimming - trim(null) already returned '' -
so behaviour is unchanged. setDisplayName() gets the same guard.
How this was tested
setEMailAddress(null)raisedtrim(): Passing null to parameter #1 ($string) of type string is deprecated; with the fix there is no deprecation and the stored value is still''. tests/lib/User: 270 tests OK.A changelog entry is included in
changelog/unreleased/; it linkspull/TBDand can be renamed to the PR number.