Handle no user session in isSharingDisabledForUser()#28911
Conversation
PVince81
left a comment
There was a problem hiding this comment.
👍 nice catch, I saw this error many times
|
Hmmm - I broke unit tests, better have a look. |
94c2680 to
1470c06
Compare
1470c06 to
abfb5bf
Compare
|
Previously I tried returning While messing with @PVince81 please re-review. |
|
Backport stable10 #28915 |
|
@PVince81 please merge if happy - and merge backport also. |
Logic was reversed since the approval, please review again.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
If isSharingDisabledForUser() is called when there is no user context, then set user to null.
Related Issue
Motivation and Context
In the log of Travis output, I noticed:
It is nice to get rid of undefined variable messages.
How Has This Been Tested?
Try logging in and creating files... as a user with this code in place. See that it does not explode.
Types of changes
Checklist: