https://www.dima.dev.slivki.by/giper-shop/skidki-posttorg

Exceptions

Key "3894" for array with keys "1978, 2202" does not exist.

  • Exception
  • Logs
  • Stack Trace

Twig\Error\ RuntimeError

  1.     <div class="after-content-block content">
  2.         <div class="sale-relations-block-list">
  3.             {% apply spaceless %}
  4.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Еще по теме', 'saleList': relatedSales|last} %}
  5.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Популярные', 'saleList': relatedSales[constant('Slivki\\Repository\\SaleRepository::POPULAR_SALE_CATEGORY_ID')] } %}
  6.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Смотрите также', 'saleList': relatedSales[constant('Slivki\\Entity\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID')]} %}
  7.             {% endapply %}
  8.         </div>
  9.         <div id="saleCommentsBlock" style="visibility: hidden"></div>
  10.     </div>
  11. {% endblock %}
  1.         // line 261
  2.         echo "                ";
  3.         $this->loadTemplate("Slivki/sale/sale_relations_block.html.twig""Slivki/sale/sale.html.twig"261)->display(twig_array_merge($context, ["title" => "Популярные""saleList" => twig_get_attribute($this->env$this->source, (isset($context["relatedSales"]) || array_key_exists("relatedSales"$context) ? $context["relatedSales"] : (function () { throw new RuntimeError('Variable "relatedSales" does not exist.'261$this->source); })()), twig_constant("Slivki\\Repository\\SaleRepository::POPULAR_SALE_CATEGORY_ID"), [], "array"falsefalsefalse261)]));
  4.         // line 262
  5.         echo "                ";
  6.         $this->loadTemplate("Slivki/sale/sale_relations_block.html.twig""Slivki/sale/sale.html.twig"262)->display(twig_array_merge($context, ["title" => "Смотрите также""saleList" => twig_get_attribute($this->env$this->source, (isset($context["relatedSales"]) || array_key_exists("relatedSales"$context) ? $context["relatedSales"] : (function () { throw new RuntimeError('Variable "relatedSales" does not exist.'262$this->source); })()), twig_constant("Slivki\\Entity\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID"), [], "array"falsefalsefalse262)]));
  7.         // line 263
  8.         echo "            ";
  9.         $___internal_parse_1_ = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  10.         // line 259
  11.         echo twig_spaceless($___internal_parse_1_);
in vendor/twig/twig/src/Template.php -> block_bottomContentBlock (line 171)
  1.             throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2.         }
  3.         if (null !== $template) {
  4.             try {
  5.                 $template->$block($context$blocks);
  6.             } catch (Error $e) {
  7.                 if (!$e->getSourceContext()) {
  8.                     $e->setSourceContext($template->getSourceContext());
  9.                 }
  1.         // line 194
  2.         echo "                </div>
  3.             </div>
  4.             ";
  5.         // line 196
  6.         $this->displayBlock('bottomContentBlock'$context$blocks);
  7.         // line 197
  8.         echo "            </div>
  9.         </div>
  10.         ";
  11.         // line 199
in vendor/twig/twig/src/Template.php -> block_content (line 171)
  1.             throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2.         }
  3.         if (null !== $template) {
  4.             try {
  5.                 $template->$block($context$blocks);
  6.             } catch (Error $e) {
  7.                 if (!$e->getSourceContext()) {
  8.                     $e->setSourceContext($template->getSourceContext());
  9.                 }
  1.         $this->displayBlock('messenger'$context$blocks);
  2.         // line 183
  3.         echo "
  4.     ";
  5.         // line 184
  6.         $this->displayBlock('content'$context$blocks);
  7.         // line 214
  8.         echo "
  9.     ";
  10.         // line 215
  11.         $this->displayBlock('popups'$context$blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  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 367)
  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();
  1.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Slivki/sale/sale.html.twig"));
  3.         $this->parent $this->loadTemplate("base.html.twig""Slivki/sale/sale.html.twig"1);
  4.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  5.         
  6.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  7.         
  8.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  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 367)
  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();
in vendor/twig/twig/src/Template.php -> display (line 379)
  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.     public function render(array $context = []): string
  2.     {
  3.         // using func_get_args() allows to not expose the blocks argument
  4.         // as it should only be used by internal code
  5.         return $this->template->render($context, \func_get_args()[1] ?? []);
  6.     }
  7.     public function display(array $context = [])
  8.     {
  9.         // using func_get_args() allows to not expose the blocks argument
  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 = []): string
  5.     {
  6.         return $this->load($name)->render($context);
  7.     }
  8.     /**
  9.      * Displays a template.
  10.      *
  1.     {
  2.         if (!$this->container->has('twig')) {
  3.             throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
  4.         }
  5.         return $this->container->get('twig')->render($view$parameters);
  6.     }
  7.     /**
  8.      * Renders a view.
  9.      */
  1.     /**
  2.      * Renders a view.
  3.      */
  4.     protected function render(string $view, array $parameters = [], Response $response null): Response
  5.     {
  6.         $content $this->renderView($view$parameters);
  7.         if (null === $response) {
  8.             $response = new Response();
  9.         }
AbstractController->render() in src/Controller/SaleController.php (line 489)
  1.         if ($user && $user->hasRole(UserGroup::STATISTICS_VIEWER)) {
  2.             $data['yesterdayShareClicks'] = $this->getShareClicks($entityID);
  3.         }
  4.         $response $this->render($view$data);
  5.         if ($isFlier) {
  6.             $this->addVisit($entityIDVisit::TYPE_FLIER_DETAILS$deviceType$this->getUser(), $request->getClientIp());
  7.         }
  8.         $this->addVisit($entityIDVisit::TYPE_SALE$deviceType$this->getUser(), $request->getClientIp());
  9.         return $response;
in vendor/symfony/http-kernel/HttpKernel.php -> detailsAction (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 30)
  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);