I upgraded my cakephp to ver 3.6 . I cant rewrite this code that worked in cakephp3.2 to make it work in 3.6 to parse get data for a search
Whats going on here as the message doesnt make sense? I tried getParam and I get same error?
Accessing routing parameters through `getData` will removed in 4.0.0. Use `getParam()`
if ($this->request->is('post')) {
if ($this->request->getData('search')!=null ) {
$filter_url['controller'] = $this->request->getParam('controller');
$filter_url['action'] = $this->request->getParam('action');
$filter_url['page'] = 1;
foreach($this->request->getData as $name => $value){ //error here
if($value){
$filter_url[$name] = urlencode($value);
}
}
return $this->redirect($filter_url);
}//if isset
} // if post