JoelWebsites Posted March 31, 2015 Share Posted March 31, 2015 (edited) Variable $name1 is undefined. in the module validator I am getting undefined error.How do I solve this? Thanks Edited March 31, 2015 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
coeos.pro Posted March 31, 2015 Share Posted March 31, 2015 it's $this->name1[] or $this->$name1[] If it's $this->name1[] then add $this->name1 = array(); else $name1 = 'something'; Link to comment Share on other sites More sharing options...
bellini13 Posted April 1, 2015 Share Posted April 1, 2015 you are trying to use a class variable $this->name1. So the first question is, did you define name1 as a class variable? class wm_marketplace { //do you have this defined? $name1 = array(); public function somefunction() { //you are trying to use a class variable, so is it defined above? $this->name1 = ''; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now