-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Ensure the user exists before calling a method on it #25652
Conversation
@@ -293,12 +294,15 @@ public static function isDefaultExpireDateEnforced() { | |||
* @return int Quota bytes | |||
*/ | |||
public static function getUserQuota($user) { | |||
$userQuota = \OC::$server->getUserManager()->get($user)->getQuota(); | |||
$user = \OC::$server->getUserManager()->get($user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeepDiver1975 $user
is reused. Rename argument to $uid
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see an issue with this because the variable is not used further down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeepDiver1975 not a real issue, I just used to read "$user" as "object" and "$uid" as "string" recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it $userId
which is more readable to also trigger jenkins.
looks 👍 apart from my question above. |
unlimited was returned in this case from the very first day - see e2f04b3#diff-9b514c1773091768aa8f61c5b6d74b9fR76 |
Nice catch, I didn't know we still had other relics of this issue... 👍 Jenkins sleeping ? |
ac2b6cf
to
a28c1fb
Compare
👍 |
Test failure unrelated, merging |
@butonic please submit backports |
I take care .... |
Ensure the user exists before calling a method on it
Ensure the user exists before calling a method on it
…e568b7bdde1bd49cfad73 [stable9.1] Merge pull request #25652 from owncloud/fix-getQuota-on-null
Ensure the user exists before calling a method on it
…68b7bdde1bd49cfad73 [stable9] Merge pull request #25652 from owncloud/fix-getQuota-on-null
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. |
fixes #24751
stable9.1: #25776
stable9: #25777