{% set shortDesc = 'Cześć jestem '~ animal.name ~'. Mam około '~animalAge~' '~yearsMonths~'. '~shortDesc %}
{% block description %}{{ shortDesc }}{% endblock %}
{% block og_description %}{{ shortDesc }}{% endblock %}
{% if animal.featuredImage.id is not empty %}
{# {% block og_image %}#}
{# {{ asset(animalImage(animal.featuredImage.path)) | imagine_filter('animal_og_image') }}#}
{# {% endblock %}#}
{% endif %}
// line 56
$context["fullDesc"] = (isset($context["shortDesc"]) || array_key_exists("shortDesc", $context) ? $context["shortDesc"] : (function () { throw new RuntimeError('Variable "shortDesc" does not exist.', 56, $this->source); })());
// line 57
$context["shortDesc"] = ((((((("Cześć jestem " . twig_get_attribute($this->env, $this->source, (isset($context["animal"]) || array_key_exists("animal", $context) ? $context["animal"] : (function () { throw new RuntimeError('Variable "animal" does not exist.', 57, $this->source); })()), "name", [], "any", false, false, false, 57)) . ". Mam około ") . (isset($context["animalAge"]) || array_key_exists("animalAge", $context) ? $context["animalAge"] : (function () { throw new RuntimeError('Variable "animalAge" does not exist.', 57, $this->source); })())) . " ") . (isset($context["yearsMonths"]) || array_key_exists("yearsMonths", $context) ? $context["yearsMonths"] : (function () { throw new RuntimeError('Variable "yearsMonths" does not exist.', 57, $this->source); })())) . ". ") . (isset($context["shortDesc"]) || array_key_exists("shortDesc", $context) ? $context["shortDesc"] : (function () { throw new RuntimeError('Variable "shortDesc" does not exist.', 57, $this->source); })()));
// line 62
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["animal"]) || array_key_exists("animal", $context) ? $context["animal"] : (function () { throw new RuntimeError('Variable "animal" does not exist.', 62, $this->source); })()), "featuredImage", [], "any", false, false, false, 62), "id", [], "any", false, false, false, 62))) {
}
// line 1
$this->parent = $this->loadTemplate("layout/base.html.twig", "front/animal/single.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
public function render(array $context = []): string
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_get_args()[1] ?? []);
}
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
if ($v instanceof FormInterface) {
$parameters[$k] = $v->createView();
}
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*
* If an invalid form is found in the list of parameters, a 422 status code is returned.
* Forms found in parameters are auto-cast to form views.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
$response ??= new Response();
if (200 === $response->getStatusCode()) {
foreach ($parameters as $v) {
if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
'front/animal/single.html.twig',
[
'animal' => $animal,
// 'poll' => $poll,
'notes' => $notes,
'similarAnimals' => $similarAnimals
]
);
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
use Symfony\Component\HttpFoundation\Request;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
$request = Request::createFromGlobals();
if($request->getClientIp() == "95.217.17.2") {
No log messages
RuntimeError
|
---|
Twig\Error\RuntimeError: Impossible to access an attribute ("id") on a null variable. at templates/front/animal/single.html.twig:62 at twig_get_attribute() (var/cache/dev/twig/13/139e5aca06ce7d8199d04f02c69a2a20.php:127) at __TwigTemplate_4f65eec05383462cda21775d2c12cbf9->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (vendor/twig/twig/src/Template.php:379) at Twig\Template->render() (vendor/twig/twig/src/TemplateWrapper.php:40) at Twig\TemplateWrapper->render() (vendor/twig/twig/src/Environment.php:280) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:242) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:253) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/Front/AnimalController.php:251) at App\Controller\Front\AnimalController->singleAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:184) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/home/adopt/web/adopciaki.pl/public_html/vendor/autoload_runtime.php') (public/index.php:6) |