Error 500 Internal Server Error

GET http://betforfun.be/competition/5/statistics

Exceptions

Call to a member function getRound() on null

Exception

Error

  1.         $worst_ranking_round $user_competition_round;
  2.       }
  3.       // Round details
  4.       $statistics['rounds'][] = ['id' => $round->getId(), 'name' => $round->getName(), 'sequence' => $round->getSequence(), 'points' => $user_competition_round->getPoints(), 'ranking' => $user_competition_round->getRanking(), 'bets_number' => $user_competition_round->getBetsNumber(), 'rate' => $user_competition_round->getBetsNumber() > round(($user_competition_round->getBetsWon() / $user_competition_round->getBetsNumber()) * 1002) : 0'bets_won' => $user_competition_round->getBetsWon(), 'bets_lost' => $user_competition_round->getBetsLost(),];
  5.     }
  6.     $statistics['records'] = ['points' => ['best' => ['round' => $best_point_round->getRound()->getName(), 'points' => $best_point_round->getPoints(),], 'worst' => ['round' => $worst_point_round->getRound()->getName(), 'points' => $worst_point_round->getPoints(),],], 'ranking' => ['best' => ['round' => $best_ranking_round->getRound()->getName(), 'ranking' => $best_ranking_round->getRanking(),], 'worst' => ['round' => $worst_ranking_round->getRound()->getName(), 'ranking' => $worst_ranking_round->getRanking(),],]];
  7.     $statistics['chart'] = ['options' => ['chart' => ['id' => 'basic-bar'], 'xaxis' => ['categories' => $chart_x_axis], 'stroke' => ['curve' => 'smooth',], 'yaxis' => ['reversed' => true]], 'series' => [['name' => 'Ranking''data' => $chart_ranking_series],]];
  8.     return $this->render('statistics/show.html.twig', [
  9.       'competition' => $competition,
  10.       'statistics' => $statistics,
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         if (!$this->handlingHttpCache) {
  2.             $this->resetServices true;
  3.         }
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.     ) {
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         if (Kernel::VERSION_ID >= 60400) {
  7.             $response->send(false);
  8.             if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 32)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

No log messages

Stack Trace

Error
Error:
Call to a member function getRound() on null

  at src/Controller/UserStatisticsController.php:79
  at App\Controller\UserStatisticsController->get(object(Request), object(EntityManagerGhost614a58f), object(Competition))
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/vendor/autoload_runtime.php')
     (public/index.php:5)