cakephp - Fatal error: Call to undefined method CookieComponent::del() -


hi have strange error in code. want make cookie system cakephp, , in app_controller.php include

var $components = array('auth', 'cookie'); var $helpers = array('html', 'form', 'session');

but everytime click on logout link error appears. function

function logout() { $cookie = $this->cookie->read('user'); if($cookie) $this->cookie->del('user'); $this->session->setflash('logout'); $this->redirect($this->auth->logout()); }

where can solution? thank dude

the method name delete, not del, hence error. see http://api.cakephp.org/class/cookie-component#method-cookiecomponentdelete


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -