Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Warning: Trying to access array offset on value of type null

Exception

ErrorException

Show exception properties
ErrorException {#941
  #severity: E_WARNING
}
  1.         $this->params['referer'] = $referer;
  2.         //epingle
  3.         $epingle $this->em->getRepository(Ressources::class)->getEpingle($this->locale_p$field$ressource);
  4.         if ($epingle != null$this->params['epingle'] = $epingle;
  5.         $ressource $this->em->getRepository(Ressources::class)->getRessourcesFromField($this->locale_p$field$ressource); 
  6.         $this->params['page_title'] = $ressource['titre'];
  7.         $this->params['ressource'] = $ressource;
  8.         if ($ressource['isPress'] == true) {
  9.             $this->params['breadcrumb'] = $this->generateBreadCrumb(
  10.                 $this->translator,
  11.                 "ressources_presse",
MainController->ressource(null, 'alias_fr', object(Request)) in src/Controller/MainController.php (line 461)
  1.                     break;
  2.                 case 'expos':
  3.                     return $this->expos($name_sql$fieldLocale$request);
  4.                     break;
  5.                 case 'ressources':
  6.                     return $this->ressource($name_sql$fieldLocale$request);
  7.                     break;
  8.                 case 'pagepresse':
  9.                     return $this->presse($request);
  10.                     break;
  11.                 case 'pagechercheur':
  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.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/www/mdf_new/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

ErrorException
ErrorException:
Warning: Trying to access array offset on value of type null

  at src/Controller/MainController.php:884
  at App\Controller\MainController->ressource(null, 'alias_fr', object(Request))
     (src/Controller/MainController.php:461)
  at App\Controller\MainController->routes(object(Request), 'fiche-de-poste-guide-conferencier-vacataire-pour-les-visites-guidees-en-francais-fh')
     (vendor/symfony/http-kernel/HttpKernel.php:181)
  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:197)
  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:29)
  at require_once('/home/www/mdf_new/vendor/autoload_runtime.php')
     (public/index.php:5)