Sunday, 18 August 2013

CakePHP - Call to a member function search() on a non-object

CakePHP - Call to a member function search() on a non-object

i created a NamesController.php in my cakephp installation and i created a
search function:
public function search($api_key = null,$domain = null,$keywords =
null,$country = null,$type = null) {
$result = $this->Mails->search($keywords,$country,$type);
return $result;
}
but this returns me an error:
Call to a member function search() on a non-object
ps:MailsController.php also contains a search function,which works well.
Why this turns me out this error? What am i actually doing wrong?
Thank ya in advance!

No comments:

Post a Comment