It works, thanks a lot. Next time I will post on Symfony2 topic.
If somebody looks for the code of the solution: file AppKernel.php protected $_forms = array('Register', 'Login', 'Window'); function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) { $filter = new RequestFilter(array('xss' => 'STRICT')); foreach($this->_forms as $form) { if(count(($formParts = $request->request->all($form))) > 0) { $filtered = $filter->filterData($formParts); $request->request->set('Register', $filtered[$form]); break; } } return parent::handle($request, $type, $catch); } On 29 juil, 06:28, ryan weaver <weaverr...@gmail.com> wrote: > Hi there! > > I would simply fetch out the parameter called "Register" into an array, > change the value of the sub-item "login", and then set that entire array > back to the parameter bag under the "Register" key. Then you should be fine. > > Also, if you can ask these questions here first, it'll help keep this board > focused on Symfony2 dev topics :) > > http://groups.google.com/group/Symfony2 > > Thanks! > > Ryan Weaver > US Office Head & Trainer - KnpLabs - Nashville, > TNhttp://www.knplabs.com<http://www.knplabs.com/en>http://www.thatsquality.com > Twitter: @weaverryan > > > > > > > > On Thu, Jul 28, 2011 at 8:20 AM, B K <bartkoniec...@gmail.com> wrote: > > Hello, > > > I have a small problem with set method of Symfony\Component > > \HttpFoundation\ParameterBag class. > > > In fact, I try to override some of request values (some POST data > > passed to my forms). I found a function which sets/replaces request > > values. > > > Class : Symfony\Component\HttpFoundation\ParameterBag > > public function set($key, $value) > > { > > $this->parameters[$key] = $value; > > } > > > However, this method doesn't handle arrays. > > > My array looks like : > > > Array ( [Register] => Array ( [login] => dede [pass1] => sdqs [pass2] > > => dqsd [email] => dsqd ) ) > > > When I try to replace, for this example, the value of login key, I > > can't do it because set() method handles only one deep array. > > > Did anyone achieve that ? Maybe ParameterBag is not a good place for > > that ? Or maybe it's a little bug of Symfony2 ? > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony developers" group. > > To post to this group, send email to symfony-devs@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-devs+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/symfony-devs?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en