Symfony Exception

Error

HTTP 500 Internal Server Error

Call to a member function has() on null

Exception

Error

  1.         $endpoint $this->endpoint $path '?_format=json';
  2.         $cacheKey md5($endpoint $subrequestsBody $preview);
  3.         if ($forceUpdateCache === false && $this->cache->has($cacheKey)) {
  4.             return json_decode($this->cache->get($cacheKey));
  5.         } else {
  6.             $fetcher = new DrupalDataFetcher($this->defaultLocale);
  7.             $resultDecoded $fetcher->fetch($subrequestsBody$preview$locale);
StaticClient->fetch() in src/HelloMonday/Static/StaticClient.php (line 280)
  1.     {
  2.         if (!is_null($this->fullDump)) {
  3.             return;
  4.         };
  5.         $result $this->fetch($locale);
  6.         $this->parseSubrequests($result);
  7.         $this->fullDump $this->parser->parseResult($result->all->body);
  8.         $this->builder->fullDump $this->fullDump;
StaticClient->requestFullDump() in src/HelloMonday/Static/StaticClient.php (line 127)
  1.     {
  2.         if ($locale === NULL) {
  3.             $locale $this->defaultLocale;
  4.         }
  5.         $this->requestFullDump($locale);
  6.         $l count($this->fullDump);
  7.         $entry null;
  8.         for ($i 0$i $l$i++) {
StaticClient->getEntryByPath() in src/Controller/DefaultController.php (line 59)
  1.     public function wildcardAction(Request $request$path)
  2.     {
  3.         $additionalParams = [];
  4.         $template 'DefaultTemplate';
  5.         $entry $this->CMS_CLIENT->getEntryByPath($request$path'page');
  6.         return $this->CMS_CLIENT->getPage($request'templates/' $template '.html.twig'$entry$additionalParams);
  7.     }
  8.     public function showException(Request $requestFlattenException $exceptionDebugLoggerInterface $logger null)
  9.     {
in vendor/symfony/http-kernel/HttpKernel.php -> wildcardAction (line 157)
  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.     public function handle(Request $requestint $type HttpKernelInterface::MASTER_REQUESTbool $catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  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 28)
  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

Error

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

  at src/HelloMonday/Static/StaticClient.php:307
  at App\HelloMonday\StaticClient\StaticClient->fetch()
     (src/HelloMonday/Static/StaticClient.php:280)
  at App\HelloMonday\StaticClient\StaticClient->requestFullDump()
     (src/HelloMonday/Static/StaticClient.php:127)
  at App\HelloMonday\StaticClient\StaticClient->getEntryByPath()
     (src/Controller/DefaultController.php:59)
  at App\Controller\DefaultController->wildcardAction()
     (vendor/symfony/http-kernel/HttpKernel.php:157)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:79)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:196)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:28)