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
Post a Comment