[symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-10 Thread Casey
If you are arriving at this page via a post request than, the code in the if statement will get run. I would recommend the following: if($request->isMethod('post') && $request->hasParameter($form- >getName())){ //code code code } Obviously, that will only get run when the form is posting to

Re: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-07 Thread Parijat Kalia
Yes, that it is. It is being redirect to from the login page ...the login page is a post, and then if the credentials are verified I use this $this->redirect(thisModule/thisPage) but it is kind of strange that a post from another page is being redirected here, because the post on the login page p

[symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-07 Thread Casey
So when you navigate to the page, in what shou;d be a get request, without submitting the form, the var_dump call dumps true? If that is the case than there is something going on that is probably not symfony related. It is possible to create link with symfony that will call the page in a post req

Re: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-06 Thread Parijat Kalia
All right...it did post a bool, that is truewhich has been the case...here is the actionI am posting only until the if($this->getRequest()->isMethod('post')) line...after that it's just code execution...the template code follows after the action * public function executeCreateQuestions()

[symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Casey
add this code before the if statement: var_dump($this->getRequest()->isMethod('post'); trigger_error("HERE",E_USER_ERROR); that will dump the bool value from the method and then throw a fatal error to halt the script. If the dumped value is a bool true, than you are dealing with a post request. A

Re: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Parijat Kalia
No, that is sample code, not the actual code. still confused... 2010/5/5 Casey > You are missing a parenthesis in the code above, could that be the > issue, or was that only in your posting. Confirm you code looks like > > public function executeSomething(){ > if($this->getRequest()->isMethod('

[symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Casey
You are missing a parenthesis in the code above, could that be the issue, or was that only in your posting. Confirm you code looks like public function executeSomething(){ if($this->getRequest()->isMethod('post')){ //do stuff } notice the 2 parenthesis in that code. As long as the form

Re: Re[2]: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Parijat Kalia
One sec, can you give me the reasoning for that please? I have several pages with forms that postacross all I have this function executeSomething() { if($this->getRequest()->isMethod('post') { // post button action } } all of these seem to be working, but when I load this particular

Re[2]: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Земсков Юрий
method declaration looks like  public function executeSomething(sfWebRequest $request) OR  public function executeSomething() ? Try the first one. Вы писали 5 мая 2010 г., 23:04:21: > Oh I tried that...it doesn't recognize the variable at all...what i did was $request->isMethod('pos

Re: [symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-05 Thread Parijat Kalia
Oh I tried that...it doesn't recognize the variable at all...what i did was $request->isMethod('post')...so any clue? On Tue, May 4, 2010 at 8:51 PM, fRAnKEnSTEin wrote: > Hi there, > > If you are inside some controller action you can try "$request- > >isMethod('post')" instead "$this->getRequ

[symfony-users] Re: $this->getRequest()->isMethod('post')

2010-05-04 Thread fRAnKEnSTEin
Hi there, If you are inside some controller action you can try "$request- >isMethod('post')" instead "$this->getRequest()->isMethod('post')" Tell me what happen if you give it a try... Cheers -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-pro