I just wanted to ask why the following inside a Zend_Controller_Action action method:
$request = $this->getRequest();
$params = $request->getParams();
var_dump($params);
foreach ($params as $key => &$value) {
$value = null;
}
var_dump($params);
$request->setParams($params);
var_dump($request->getParams());
produces this:
array
'controller' => string 'bug' (length=3)
'action' => string 'edit' (length=4)
'id' => string '210' (length=3)
'module' => string 'default' (length=7)
'author' => string 'test2' (length=5)
array
'controller' => null
'action' => null
'id' => null
'module' => null
'author' => null
array
'author' => string 'test2' (length=5)
Shouldn't the 'author' variable be cleared too?
Thanks in advance!