https://akracing.undo.jp/shopping/login

Exceptions

Call to a member function getItems() on null

  • Exception
  • Logs
  • Stack Trace

Error

  1.     public function index(TemplateEvent $templateEvent)
  2.     {
  3.         $Cart $this->cartService->getCart();
  4.         /* @var CartItem $cartItem */
  5.         $cartItem $Cart->getItems()->first();
  6.         if ($cartItem->getProductClass()->getSaleType()->getName() !== '定期商品') {
  7.             return;
  8.         }
  9.         $templateEvent
  10.             ->addSnippet('@EccubePaymentLite42/default/Shopping/remove_guest_purchase_btn.twig');
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
TraceableEventDispatcher->dispatch(object(TemplateEvent), 'Shopping/login.twig') in src/Eccube/Twig/Template.php (line 36)
  1.         if (isset($globals['event_dispatcher']) && strpos($this->getTemplateName(), '__string_template__') !== 0) {
  2.             /** @var EventDispatcherInterface $eventDispatcher */
  3.             $eventDispatcher $globals['event_dispatcher'];
  4.             $originCode $this->env->getLoader()->getSourceContext($this->getTemplateName())->getCode();
  5.             $event = new TemplateEvent($this->getTemplateName(), $originCode$context);
  6.             $eventDispatcher->dispatch($event$this->getTemplateName());
  7.             if ($event->getSource() !== $originCode) {
  8.                 $newTemplate $this->env->createTemplate($event->getSource());
  9.                 $newTemplate->display($event->getParameters(), $blocks);
  10.             } else {
  11.                 parent::display($event->getParameters(), $blocks);
in vendor/twig/twig/src/Template.php -> display (line 390)
  1.             ob_start();
  2.         } else {
  3.             ob_start(function () { return ''; });
  4.         }
  5.         try {
  6.             $this->display($context);
  7.         } catch (\Throwable $e) {
  8.             while (ob_get_level() > $level) {
  9.                 ob_end_clean();
  10.             }
  1.      */
  2.     public function render(array $context = []): string
  3.     {
  4.         // using func_get_args() allows to not expose the blocks argument
  5.         // as it should only be used by internal code
  6.         return $this->template->render($context, \func_get_args()[1] ?? []);
  7.     }
  8.     /**
  9.      * Displays the template.
  10.      *
  1.      * @throws SyntaxError  When an error occurred during compilation
  2.      * @throws RuntimeError When an error occurred during rendering
  3.      */
  4.     public function render($name, array $context = [])
  5.     {
  6.         return $this->load($name)->render($context);
  7.     }
  8.     /**
  9.      * Displays a template.
  10.      *
  1.                 $this->twig->display($template->getTemplate(), $parameters);
  2.             };
  3.             $event->setResponse(new StreamedResponse($callback));
  4.         } else {
  5.             $event->setResponse(new Response($this->twig->render($template->getTemplate(), $parameters)));
  6.         }
  7.         // make sure the owner (controller+dependencies) is not cached or stored elsewhere
  8.         $template->setOwner([]);
  9.     }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.         $response $controller(...$arguments);
  2.         // view
  3.         if (!$response instanceof Response) {
  4.             $event = new ViewEvent($this$request$type$response);
  5.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  6.             if ($event->hasResponse()) {
  7.                 $response $event->getResponse();
  8.             } else {
  9.                 $msg sprintf('The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned %s.'$this->varToString($response));
  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(object(Request)) in index.php/ (line 83)
  1.         }
  2.     }
  3. }
  4. $kernel = new Kernel($env$debug);
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);