yii2-debug
yii2-debug copied to clipboard
MongoDb user with id = MongoDB/BSON/ObjectId
This issue has originally been reported by @BenasPaulikas at https://github.com/yiisoft/yii2/issues/15189. Moved here by @cebe.
I'm not sure if this is a bug or I should handle it. :)
What steps will reproduce the problem?
Create users collection in mongodb. Login as user. Make auth key no more valid and /yii/web/user will try do this but id is not a string but ObjectId and it will throw Array to string conversion
Yii::warning("Invalid auth key attempted for user '$id': $authKey", METHOD);
What is the expected result?
Maybe do (string) $id ? I'm not sure
What do you get instead?
Array to string conversion exception
Additional info
Q | A |
---|---|
Yii version | 2.0.? |
PHP version | 7.1 |
Operating system | Linux |
@cebe that doesn't seem to be debug issue but core one.