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 have the method you want to use!

Use var_dump or echo CVarDumper::dump($param, 10, true); ** or **print_r , to understand why it is not an object!

For example if you tried to get a user via active record it can be null if it does not exist, you need to check it.

Posted in: Yii

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677