Skip to content
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

Bug Report #5

Open
JimChenWYU opened this issue Oct 24, 2020 · 0 comments
Open

Bug Report #5

JimChenWYU opened this issue Oct 24, 2020 · 0 comments

Comments

@JimChenWYU
Copy link

JimChenWYU commented Oct 24, 2020

example:

$user = User::find()->select(['id', 'name'])->one();
$user->name = 'abc';
$user->save();

It will throw Exception like Undefined index: created_at ...

I find the CarbonBehavior.php
in https://github.com/yii2mod/yii2-behaviors/blob/master/CarbonBehavior.php#L116

Because I only select id, name, so it can not contain created_at in oldAttributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant