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
dirtyAttributes #622
Comments
model have 2 attributes - id and name |
Возможно написано плохо, с письменным английским не очень, переведите кто может, если вдруг по вышенаписанному невозможно понять суть |
Thanks! |
* 'master' of github.com:yiisoft/yii2: Asset feature refactoring (WIP) Fixes yiisoft#622. Fixed matching all case.
public function isAttributeChanged($name)
{
if (isset($this->_attributes[$name], $this->_oldAttributes[$name])) {
return $this->_attributes[$name] !== $this->_oldAttributes[$name]; // ***
} else {
return isset($this->_attributes[$name]) || isset($this->_oldAttributes[$name]);
}
} *** after form POST all attributes become strings... an integer value becomes "1" so the operator !== returns true even if attribute has the same value |
Can you please open a new issue for this? |
sure! 2013/12/12 Carsten Brandt notifications@github.com
|
https://github.com/yiisoft/yii2/blob/master/framework/yii/db/ActiveRecord.php#L597
if isset attr1 and attr2 and changed attr1 than ->isAttributeChanged('attr2') return true
The text was updated successfully, but these errors were encountered: