-
-
Notifications
You must be signed in to change notification settings - Fork 179
app/Policies/OwnershipTrait contains a bug, i think #320
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
Comments
Hi, what db are you using? edit: also tested with sqlite, can't reproduce either |
Can you please confirm you have this line in log files (see
|
Hi,
I have added an extra line of logging for personal debugging |
Ok, thx for the env setup. |
yes, thanks. I i can be of any help let me know. I am a java//php dev as well. |
Well, I cannot reproduce, even with the exact same setup. What page do you load while debugging the trait? |
Could you please try this fix for me ? Edit protected $casts = [
'user_id' => 'integer',
]; Thx |
That fixes the issue, triple equality is now comparing two integers |
Ok thanks 👍🏻 |
Version
2FAuth – v5.0.4
Details & Steps to reproduce
app/Policies/OwnershipTrait line 16 contains a bug, i think. In my case the $item->user_id is a string with does not make it triple equal to $user->id
When i wrap the $item->user_id in a intval() the class starts working.
It appears to bethe same issue as described here: #305
Expectation
no errors when clicking the sfauth key.
Error & Logs
No response
Execution environment
No response
Containerization
Additional information
No response
The text was updated successfully, but these errors were encountered: