-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
\yii\db\BaseActiveRecord::getDirtyAttributes causes Fatal Error in 2.0.46 #19544
Comments
Could it be reproduced with non-mongo AR? |
Does it work with 2.0.45? |
yeah with 2.0.45 it's working. It's also not directly related to mongo (because it's also called in the updateAttributes of the BaseActiveRecord class, in this case a \yii\base\Model class). |
Do you have some time to help with a reproducible test-case we can use to debug/fix it? |
Maybe it's more clear if you add this to the test from above:
will output:
|
Maybe it's only needed to modify the getDirtyAttributes() in the \yii\mongodb\ActiveRecord class so that it will use the toArray() method, like for the insert into the mongodb. |
Perhaps related to #19546 ? |
also related #19531 |
Should be already fixed in master. |
Since the version 2.0.46 we are getting a fatal error, if we want to update data in a complex mongo collection and where we are using Yii models for the ActiveRecord class attributes to validate some additional stuff.
What steps will reproduce the problem?
What is the expected result?
A working test.
What do you get instead?
Additional info
The text was updated successfully, but these errors were encountered: