Welcome Guest, Not a member yet? Register   Sign In
non-object Error
#7

(This post was last modified: 03-12-2017, 04:33 PM by marksman.)

Maybe you are calling on a property that is not defined, you may be do some verification before calling a property something like
PHP Code:
property_exists(__CLASS__'propertyName'
and as a friendly advice if you have your own autoloader put it in your autoloader, your autoloader is the best location where you will have to define those properties and to be accessible by your class.
for example you have your MY_Autoloader that extends to you CI_Controller and your controller extends to MY_Autoloader or it depends how you name it. In this case the property has been set automatically before your controller has been loaded. Goodluck. Smile

Just take note, using $this and static are different instance.
God Bless CI Contributors Smile
Reply


Messages In This Thread
non-object Error - by UygarDemirKoƧ - 03-12-2017, 01:59 AM
RE: non-object Error - by InsiteFX - 03-12-2017, 04:00 AM
RE: non-object Error - by Narf - 03-12-2017, 06:48 AM
RE: non-object Error - by pdthinh - 03-12-2017, 09:19 AM
RE: non-object Error - by InsiteFX - 03-12-2017, 09:28 AM
RE: non-object Error - by Narf - 03-12-2017, 01:50 PM
RE: non-object Error - by marksman - 03-12-2017, 04:30 PM
RE: non-object Error - by UygarDemirKoƧ - 03-19-2017, 06:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB