Symfony Exception

Exception

HTTP 500 Internal Server Error

Failed to parse time string (category-reisen-01 00:00:00) at position 0 (c): The timezone could not be found in the database

Exception

Exception

  1.         parent::__construct($registryBlogArticle::class);
  2.     }
  3.     public function findByYearMonthName($year$month$name)
  4.     {
  5.         $from = new \DateTime($year '-' $month '-01 00:00:00');
  6.         $to = new \DateTime($year '-' $month '-31 23:59:59');
  7.         $qb $this->createQueryBuilder('b')
  8.             ->andWhere('b.createdAt BETWEEN :from AND :to')
  9.             ->setParameter('from'$from)
  10.             ->setParameter('to'$to)
DateTime->__construct() in src/Repository/BlogArticleRepository.php (line 25)
  1.         parent::__construct($registryBlogArticle::class);
  2.     }
  3.     public function findByYearMonthName($year$month$name)
  4.     {
  5.         $from = new \DateTime($year '-' $month '-01 00:00:00');
  6.         $to = new \DateTime($year '-' $month '-31 23:59:59');
  7.         $qb $this->createQueryBuilder('b')
  8.             ->andWhere('b.createdAt BETWEEN :from AND :to')
  9.             ->setParameter('from'$from)
  10.             ->setParameter('to'$to)
BlogArticleRepository->findByYearMonthName() in src/Controller/BlogController.php (line 273)
  1.                 'year' => $year,
  2.                 'month' => $month,
  3.                 'name' => $this->redirects[$name]
  4.                 ], 301);
  5.         }
  6.         $article $this->getDoctrine()->getRepository(BlogArticle::class)->findByYearMonthName($year$month$name);
  7.         if (!$article) {
  8.             if (($year == 2008 && $month 10) || $year 2008) {
  9.                 return $this->redirectToRoute('view_blog_article', [
  10.                     'year' => 2008,
in vendor/symfony/http-kernel/HttpKernel.php -> viewArticle (line 163)
  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);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  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.     }
Kernel->handle() in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

Exception
Exception:
Failed to parse time string (category-reisen-01 00:00:00) at position 0 (c): The timezone could not be found in the database

  at src/Repository/BlogArticleRepository.php:25
  at DateTime->__construct()
     (src/Repository/BlogArticleRepository.php:25)
  at App\Repository\BlogArticleRepository->findByYearMonthName()
     (src/Controller/BlogController.php:273)
  at App\Controller\BlogController->viewArticle()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)