I use get form for searching keywords. (CakePHP 2.2.5)
I see weird problems.
Firstly from CakePHP documentation : $foo = $this->request->query('value_that_does_not_exist'); give
Error: An Internal Error Has Occurred.
Method query does not exist
I tried that in both Controller and the view.
According to the manual it can be used to:
…read the url query array in an error free manner.
Btw,
$foo = $this->request->query['value_that_exist'];
works fine but I have to check it with “isset()“
Is it a CakePHP bug? I tested with fresh 2.2.5 install.
No, it is not a bug. The
query()method was introduced in CakePHP 2.3.0-beta (see http://bakery.cakephp.org/articles/lorenzo/2012/10/28/cakephp_2_3_0-beta_released#cakerequest) and hence it is not available in CakePHP 2.2.5.