Common Yii questions

Comparing #10 with #11

Revision #11 was created by Maurizio Domba Cerin Maurizio Domba Cerin on Oct 18, 2011, 8:37:56 AM.

fixed spelling errors

Content

[...]
### I got an error: Call to a member function getAttributes() on a non-object ...
what to do?

#### Answer:
First of all you should always read the error...
The problem is actually indeed that you trying to use a function on some variable that is not an object, and because it is not an object - it doesn't ha
sve the method you want to use! so uUse **var_dump** or **echo CVarDumper::dump($param, 10, true); ** or **print_r** , TOto understand why it is not an object! fFor example if you tried to get a user via active record it can be null if it idoes not exists, you need to check it...

<hr/>

### Why Form / ActiveForm not doing ajax validation ?
[...]