Revision #11 has been created by Maurizio Domba Cerin on Oct 18, 2011, 8:37:56 AM with the memo:
fixed spelling errors
« previous (#10) next (#12) »
Changes
Title
unchanged
Common Yii questions
Category
unchanged
FAQs
Yii version
unchanged
Tags
unchanged
yii, common, questions, beginners
Content
changed
[...]
### 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 hasve 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 exist
s, you need to check it...
<hr/>
### Why Form / ActiveForm not doing ajax validation ?[...]