Alex Tech Adventures The webs best tutorials!

Favourites Create PDF Email Print

I get Notice: Trying to get property of non-object in application/plugins/AccessCheck.php

Author:
Alexander Romanenko
Date added:
Saturday, 22 August 2009
Last revised:
never
Hits:
1988
Rating:
 
Vote for this:
Good - Bad
favoured:
0 Favour

Answer

After completing Zend_Acl tutorial I get an error
Notice: Trying to get property of non-object in application/plugins/AccessCheck.php on line xx
where line xx contains
$user_role = $identity ->user_role;

This is a generally acceptable message generated as a result of relying on the fact that non-loged in users will have null zend_auth identity object.  For details on how to improve on that, see my tutorial 9, Zend Registry and Authentication Improvement

Category

Login Form

Next up

Error handling.

You are here: Home FAQ Zend Framework FAQ I get Notice: Trying to get property of non-object in application/plugins/AccessCheck.php

Statistics

Members : 1401
Content : 42
Web Links : 1
Content View Hits : 191204

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 39 guests online