Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getVariables() method issue #2

Closed
mywhere opened this issue Apr 15, 2012 · 1 comment
Closed

getVariables() method issue #2

mywhere opened this issue Apr 15, 2012 · 1 comment
Labels

Comments

@mywhere
Copy link

mywhere commented Apr 15, 2012

Thanks for this great restful example. But it seems the module.php has some problem based on ZF2 beta 3 when request category.json and thumb.json, as for these two controllers, their getList is returned an array, but not ViewModel. $e->getResult()->getVariables() doesn't work.
So in my local, the fixture is:
Module.php (Line 53)
$vars = $e->getResult();
if($vars instanceof \Zend\View\Model\ViewModel)
{
$vars = $e->getResult()->getVariables();
}
$postProcessor = $di->get($formatter . '-pp', array(
'vars' => $vars,
'response' => $e->getResponse()
));

@vasrap
Copy link
Owner

vasrap commented Apr 15, 2012

Hi John, thanks for highlighting this.

I verified the issue. Feel free to open a pull request with your fix.

Thanks again!

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

No branches or pull requests

2 participants