https://nmhata01.xsrv.jp/products/detail/27

Exceptions

Impossible to access an attribute ("School") on a null variable.

  • Exception
  • Logs
  • Stack Trace

Twig\Error\ RuntimeError

  1.     {% endif %}
  2. {% endif %}
  3. {% if Product is defined %}
  4.     {% if Product.ProductCategories is not empty %}
  5.         {% for ProductCategory in Product.ProductCategories %}
  6.             {% if ProductCategory.Category.School == app.user.School %}
  7.             <div class="jscategory2"><a href="{{ url('product_list') }}?category_id={{ ProductCategory.Category.id }}">{{ ProductCategory.Category.name }}</a></div>
  8.             {% endif %}
  9.         {% endfor %}
  10.     {% endif %}
  11. {% endif %}
  1.                             $context['_parent'] = $context;
  2.                             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'140$this->source); })()), "ProductCategories", [], "any"falsefalsetrue140));
  3.                             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  4.                                 // line 141
  5.                                 echo "            ";
  6.                                 if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsetrue141), "School", [], "any"falsefalsetrue141) == twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'141$this->source); })()), "user", [], "any"falsefalsetrue141), "School", [], "any"falsefalsetrue141))) {
  7.                                     // line 142
  8.                                     echo "            <div class=\"jscategory2\"><a href=\"";
  9.                                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  10.                                     echo "?category_id=";
  11.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsetrue142), "id", [], "any"falsefalsetrue142), 142$this->source), "html"nulltrue);
in vendor/twig/twig/src/Template.php -> doDisplay (line 405)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 378)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
Template->display(array('title' => '', 'subtitle' => 'スモック', 'form' => object(FormView), 'Product' => object(Product), 'is_favorite' => false, 'RecommendSize' => array(), 'Place' => array('肩幅', '袖丈', '裄丈', '総丈', '首回り', 'バスト', 'ウェスト', 'ヒップ', '股下', 'スカート丈', '身長', '体重'), 'x' => 0, 'y' => 0, 'ProductInSet' => array(), 'SetProduct' => null, 'app' => object(AppVariable), 'BaseInfo' => object(BaseInfo), 'eccube_config' => object(EccubeConfig), 'event_dispatcher' => object(TraceableEventDispatcher), 'Layout' => object(Layout), 'Page' => object(Page), 'isMaintenance' => false, 'body_class' => 'product_page'), array('javascript' => array(object(__TwigTemplate_d5bbacbe350a0034be1dbd43d8637c5fc11799b9b5496f374a915e00cde3dec8), 'block_javascript'), 'stylesheet' => array(object(__TwigTemplate_d5bbacbe350a0034be1dbd43d8637c5fc11799b9b5496f374a915e00cde3dec8), 'block_stylesheet'), 'main' => array(object(__TwigTemplate_d5bbacbe350a0034be1dbd43d8637c5fc11799b9b5496f374a915e00cde3dec8), 'block_main'))) in src/Eccube/Twig/Template.php (line 41)
  1.             $eventDispatcher->dispatch($event$this->getTemplateName());
  2.             if ($event->getSource() !== $originCode) {
  3.                 $newTemplate $this->env->createTemplate($event->getSource());
  4.                 $newTemplate->display($event->getParameters(), $blocks);
  5.             } else {
  6.                 parent::display($event->getParameters(), $blocks);
  7.             }
  8.         } else {
  9.             parent::display($context$blocks);
  10.         }
  11.     }
  1.         // line 24
  2.         $context["body_class"] = "product_page";
  3.         // line 22
  4.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"22);
  5.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  6.         
  7.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  8.         
  9.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 405)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 378)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
Template->display(array('title' => '', 'subtitle' => 'スモック', 'form' => object(FormView), 'Product' => object(Product), 'is_favorite' => false, 'RecommendSize' => array(), 'Place' => array('肩幅', '袖丈', '裄丈', '総丈', '首回り', 'バスト', 'ウェスト', 'ヒップ', '股下', 'スカート丈', '身長', '体重'), 'x' => 0, 'y' => 0, 'ProductInSet' => array(), 'SetProduct' => null), array()) in src/Eccube/Twig/Template.php (line 41)
  1.             $eventDispatcher->dispatch($event$this->getTemplateName());
  2.             if ($event->getSource() !== $originCode) {
  3.                 $newTemplate $this->env->createTemplate($event->getSource());
  4.                 $newTemplate->display($event->getParameters(), $blocks);
  5.             } else {
  6.                 parent::display($event->getParameters(), $blocks);
  7.             }
  8.         } else {
  9.             parent::display($context$blocks);
  10.         }
  11.     }
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);