Ensure the user exists before calling a method on it #25652
Conversation
lib/private/legacy/util.php
Outdated
| */ | ||
| 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.
@DeepDiver1975 $user is reused. Rename argument to $uid?
There was a problem hiding this comment.
I dont see an issue with this because the variable is not used further down
There was a problem hiding this comment.
@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.
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