Fix array_merge error when there's no route params. #39

Closed
wants to merge 2 commits into
from
View
2 Twig/PagerfantaExtension.php
@@ -70,7 +70,7 @@ public function renderPagerfanta(PagerfantaInterface $pagerfanta, $viewName = 'd
if ('_internal' === $options['routeName']) {
throw new \Exception('PagerfantaBundle can not guess the route when used in a subrequest');
}
- $options['routeParams'] = array_merge($request->query->all(), $request->attributes->get('_route_params'));
+ $options['routeParams'] = array_merge($request->query->all(), $request->attributes->get('_route_params', array()));
}
$routeName = $options['routeName'];