views:

78

answers:

1

Warning: Non-static method Zend_Controller_Request_Http::getCookie() should not be called statically in..

Iam trying the following to get Cookie values:

$cookieData = Zend_Controller_Request_Http::getCookie($key, $default);

is there an better way to this?

+1  A: 

getCookie() method is not static, it should be called on an object.

I believe this code is from your controller, so it should basically look like

$request = $this->getRequest();
$cookieData = $request->getCookie('someCookie', 'default');
Vika
No it's part of an library (-: And there is no Request object
ArneRie
Not sure what you mean by library. Is this code called within a Model?
Vika