Symfony Exception

RuntimeError

HTTP 500 Internal Server Error

Impossible to access a key ("date") on a string variable ("2018-12-11T08:35:46-05:00").

Exception

Twig\Error\ RuntimeError

  1.                     {% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  2.                         <a href="{{ path('aviatur_edit_homepromo_delete', {id: promos.id, promoType: promos.promoType}) }}">BORRAR</a>
  3.                     {% endif %}
  4.                     <figure class="promo-effect">
  5.                         <div style="height: 255px;">
  6.                             <img src="/version/{{ promos.date['date']| date('U') }}/{{ imageLink }}" alt="Vuelos a {{promos.city}}" title="Vuelos a {{promos.city}}"/>
  7.                         </div>
  8.                         <figcaption>
  9.                             <h3><span>{{promos.city}}</span></h3>
  10.                             <p>Desde {{promos.price}}<br> Ida y Regreso</p>
  11.                             <a href="{{promos.url}}"></a>
  1.                 // line 136
  2.                 echo "                    <figure class=\"promo-effect\">
  3.                         <div style=\"height: 255px;\">
  4.                             <img src=\"/version/";
  5.                 // line 138
  6.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["promos"], "date", [], "any"falsefalsefalse138), "date", [], "array"falsefalsefalse138), "U"), "html"nulltrue);
  7.                 echo "/";
  8.                 echo twig_escape_filter($this->env, (isset($context["imageLink"]) || array_key_exists("imageLink"$context) ? $context["imageLink"] : (function () { throw new RuntimeError('Variable "imageLink" does not exist.'138$this->source); })()), "html"nulltrue);
  9.                 echo "\" alt=\"Vuelos a ";
  10.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["promos"], "city", [], "any"falsefalsefalse138), "html"nulltrue);
  11.                 echo "\" title=\"Vuelos a ";
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();
  1.             // line 306
  2.             echo "            ";
  3.             if ((twig_get_attribute($this->env$this->source, (isset($context["articulo"]) || array_key_exists("articulo"$context) ? $context["articulo"] : (function () { throw new RuntimeError('Variable "articulo" does not exist.'306$this->source); })()), "url", [], "any"falsefalsefalse306) == "tiquetes-baratos")) {
  4.                 // line 307
  5.                 echo "                ";
  6.                 $this->loadTemplate($this->extensions['Aviatur\TwigBundle\Twig\Extension\FileExtension']->twigExists((("@AviaturTwig/" twig_get_attribute($this->env$this->source, (isset($context["agency_folder"]) || array_key_exists("agency_folder"$context) ? $context["agency_folder"] : (function () { throw new RuntimeError('Variable "agency_folder" does not exist.'307$this->source); })()), "twigFlux", [], "method"falsefalsefalse307)) . "/Content/Content/promoTickets.html.twig")), "@AviaturTwig/aviatur/Flux/Content/Content/view.html.twig"307)->display(twig_array_merge($context, ["agencyFolder" => (isset($context["agencyFolder"]) || array_key_exists("agencyFolder"$context) ? $context["agencyFolder"] : (function () { throw new RuntimeError('Variable "agencyFolder" does not exist.'307$this->source); })())]));
  7.                 // line 308
  8.                 echo "            ";
  9.             } elseif ((twig_get_attribute($this->env$this->source, (isset($context["articulo"]) || array_key_exists("articulo"$context) ? $context["articulo"] : (function () { throw new RuntimeError('Variable "articulo" does not exist.'308$this->source); })()), "url", [], "any"falsefalsefalse308) == "mapa-oficinas")) {
  10.                 // line 309
  11.                 echo "                ";
in vendor/twig/twig/src/Template.php -> block_body (line 182)
  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 117
  2.         echo "\t<div class=\"page__body\">
  3. \t\t<div class=\"ajax-loader spinOverlay sp-offset--big js-loadingChangeCoin\" style=\"display: none;\"></div>
  4. \t\t";
  5.         // line 119
  6.         $this->displayBlock('body'$context$blocks);
  7.         // line 120
  8.         echo "\t\t";
  9.         // line 129
  10.         echo "
  11.         <div class=\"help-call-section\">
in vendor/twig/twig/src/Template.php -> block_base_content (line 182)
  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('overlay'$context$blocks);
  2.         // line 693
  3.         echo "
  4.         ";
  5.         // line 694
  6.         $this->displayBlock('base_content'$context$blocks);
  7.         // line 725
  8.         echo "
  9.         ";
  10.         // line 726
  11.         $this->displayBlock('javascripts'$context$blocks);
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();
  1.             // line 19
  2.             if ($this->extensions['MobileDetectBundle\Twig\Extension\MobileDetectExtension']->isMobile()) {
  3.             }
  4.         }
  5.         // line 1
  6.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  7.         
  8.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  9.     }
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();
  1.             $context["host"] = 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.'9$this->source); })()), "request", [], "any"falsefalsefalse9), "getSchemeAndHttpHost", [], "method"falsefalsefalse9);
  2.         }
  3.         // line 11
  4.         $context["contentInfo"] = $this->extensions['Aviatur\TwigBundle\Twig\Extension\JsonDecode']->jsonDecode(twig_get_attribute($this->env$this->source, (isset($context["articulo"]) || array_key_exists("articulo"$context) ? $context["articulo"] : (function () { throw new RuntimeError('Variable "articulo" does not exist.'11$this->source); })()), "description", [], "any"falsefalsefalse11), true);
  5.         // line 1
  6.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  7.         
  8.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  9.     }
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();
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.     {
  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/Aviatur/ContentBundle/Controller/ContentController.php (line 1621)
  1.                         $cookieArray = [];
  2.                         foreach ($description as $key => $value) {
  3.                             $cookieArray[$key] = $value;
  4.                         }
  5.                         return $this->render($twigFolder->twigExists('@AviaturTwig/'.$agencyFolder.'/Content/Content/view.html.twig'), ['articulo' => $articulo[0], 'cookieLastSearch' => $cookieArray]);
  6.                     }
  7.                 } else {
  8.                     $cookieArray = [];
  9.                     foreach ($description as $key => $value) {
  10.                         $cookieArray[$key] = $value;
  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 web/index.php (line 24)
  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

RuntimeError
Twig\Error\RuntimeError:
Impossible to access a key ("date") on a string variable ("2018-12-11T08:35:46-05:00").

  at src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/Content/Content/promoTickets.html.twig:138
  at twig_get_attribute()
     (var/cache/prod/twig/d2/d21c3331f21c13a2d123b3d14e8bc18af93644c2375262a2645379f5b02eeffd.php:336)
  at __TwigTemplate_86f4b050422d1abef5fbcff62a68d9634b80984b5e9f66c5833ce684e355c6c5->doDisplay()
     (vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (var/cache/prod/twig/bb/bb1c89c630cdc3fe0c011de4da21051651d13467efdbdfe5339e88da99053e0f.php:691)
  at __TwigTemplate_0836dfdf322c257a479fbd7dde9f696ebdfc6efc3969253bd1ceff1960c63438->block_body()
     (vendor/twig/twig/src/Template.php:182)
  at Twig\Template->displayBlock()
     (var/cache/prod/twig/b7/b71fa889d3aadcb0b298b107d1949a48616715a84212eca7f7f134e84fa76e54.php:213)
  at __TwigTemplate_2316833c99a978109ad7176d55156d40173c2ac3de936d8ae36612f42015da36->block_base_content()
     (vendor/twig/twig/src/Template.php:182)
  at Twig\Template->displayBlock()
     (var/cache/prod/twig/a9/a913b5e5bee73232b12cb4964b2470ce872a6c818f06f1486f846655a1c0ac77.php:835)
  at __TwigTemplate_084ed6ba10b7017b5682857e1babd70e194be24d8061b69f2e5be539c1eb6e1a->doDisplay()
     (vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (var/cache/prod/twig/b7/b71fa889d3aadcb0b298b107d1949a48616715a84212eca7f7f134e84fa76e54.php:62)
  at __TwigTemplate_2316833c99a978109ad7176d55156d40173c2ac3de936d8ae36612f42015da36->doDisplay()
     (vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (var/cache/prod/twig/bb/bb1c89c630cdc3fe0c011de4da21051651d13467efdbdfe5339e88da99053e0f.php:70)
  at __TwigTemplate_0836dfdf322c257a479fbd7dde9f696ebdfc6efc3969253bd1ceff1960c63438->doDisplay()
     (vendor/twig/twig/src/Template.php:405)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:378)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:390)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:45)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:318)
  at Twig\Environment->render()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:258)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:266)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Aviatur/ContentBundle/Controller/ContentController.php:1621)
  at Aviatur\ContentBundle\Controller\ContentController->viewAction()
     (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()
     (web/index.php:24)