Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

fromQuery returns empty value #7606

Closed
danitome24 opened this issue Jul 17, 2015 · 5 comments
Closed

fromQuery returns empty value #7606

danitome24 opened this issue Jul 17, 2015 · 5 comments

Comments

@danitome24
Copy link

Hi,

I'm trying to get my query params from url like : api?name=something with $this->params()->fromQuery(); but it returns empty value when I have parameters set.

My route looks like:

'api' => array(
                'type' => 'Zend\Mvc\Router\Http\Segment',
                'options' => array(
                    'route'    => '/api',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Extranet\Controller',
                        'controller' => 'api',
                        'action' => 'index',
                    ),
                ),
            ),
@adamlundrigan
Copy link
Contributor

You'll need to provide more detail about your setup and issue, preferably a reproducible test case. I use this functionality widely in my ZF2 applications and have not encountered a case where the query parameters don't make it through to the plugin.

@joacub
Copy link

joacub commented Aug 5, 2015

I have the same problem

@danitome24
Copy link
Author

Good, the problem I had is that since module.php (specifically from the onBoostrap method) to a redirect and therefore lost the parameters that get passed me by. Look if somewhere doing something.

Cheers

@joacub
Copy link

joacub commented Aug 5, 2015

well I think it might be something to do with fastcgi fallback that hhvm use and apparently is doing me a fallback and is not filling the _GET for some reason

@joacub
Copy link

joacub commented Aug 5, 2015

yes the error is for in fallback or nginx not pass the query string to the backend

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants