I'm getting the following error:
Strict (2048): Non-static method Controller::referer() should not be called statically,
assuming $this from incompatible context [APP/View/Questions/admin_edit.ctp, line 20]
Caused by this:
//in app/View/Questions/admin_edit.ctp
echo $this->Html->link('Cancel', Controller::referer() );
Why?
You don't. You use the request object instead:
$this->request->referer();
The controller does nothing else internally.
Careful: the referer can be empty and thus you might want to provide a fallback here in that case.
Also note the optional param $local:
@param boolean $local If true, restrict referring URLs to local server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With