Skip to content

Commit

Permalink
[WebProfilerBundle] Fixed errors on search action
Browse files Browse the repository at this point in the history
  • Loading branch information
francisbesset committed Apr 13, 2011
1 parent 0d9fb8d commit 190ba59
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -237,7 +237,10 @@ public function searchAction()

$request = $this->container->get('request');

$session = $request->getSession();
if (null === $session = $request->getSession()) {
throw new \RuntimeException('To access to search, activate the session in your configuration.');
}

$session->set('_profiler_search_ip', $ip = preg_replace('/[^\d\.]/', '', $request->query->get('ip')));
$session->set('_profiler_search_url', $url = $request->query->get('url'));
$session->set('_profiler_search_limit', $limit = $request->query->get('limit'));
Expand Down

0 comments on commit 190ba59

Please sign in to comment.