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

Bug when _route_params not an array #32

Closed
keymaster opened this issue Dec 11, 2011 · 1 comment
Closed

Bug when _route_params not an array #32

keymaster opened this issue Dec 11, 2011 · 1 comment

Comments

@keymaster
Copy link

In PagerFantaExtension.php, line 73, the code says:

$options['routeParams'] = array_merge($request->query->all(), $request->attributes->get('_route_params'));

This will generate an exception when the second parameter to the array_merge() is not an array.

Replace with:

if (is_array($request->attributes->get('_route_params'))){
    $options['routeParams'] = array_merge($request->query->all(), $request->attributes->get('_route_params'));
 }else{
    $options['routeParams'] = $request->query->all();
 }
@stof
Copy link
Contributor

stof commented Dec 11, 2011

use the Symfony2.0 branch for Symfony 2.0.x

In master, it is always an array, and in Symfony 2.0, the old (hacky) logic is needed to get the route parameters as they were not available directly.

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