Difference between #1 and #2 of
Debugging CActiveRecord failed save() attempts

Changes

Title unchanged

Debugging CActiveRecord failed save() attempts

Category unchanged

Tips

Yii version unchanged

Tags unchanged

validation, active record, debug

Content unchanged

[...]
```php
Yii::log("errors saving SomeModel: " . var_export($someModelObject->getErrors(), true), CLogger::LEVEL_WARNING, __METHOD__);
```

Where $someModelObject is the model you've just tried to save(), and which is of type SomeModel.
Examine you're target output and solve the problem(s).
4 0
2 followers
Viewed: 39 695 times
Version: 1.1
Category: Tips
Written by: Boaz
Last updated by: Boaz
Created on: May 21, 2013
Last updated: 10 years ago
Update Article

Revisions

View all history