<img data-v-afd21daa="" src="{% if users.stayCoverPic is defined and users.stayCoverPic is not empty %}{{api_entrypoint}}uploads/header_profile/{{users.id}}/cropped/3000_1500/{{users.stayCoverPic.imageName}}{% else %} /images/StayLancer_Default/staylance-6b-20150417_203458.jpg {% endif %}" class="img-responsive minheight staylance-probg" >
{% else %}
<img data-v-6b24df5f="" src="{% if users.headerImage is defined and users.headerImage is not empty %}{{api_entrypoint}}uploads/media/header_profile/{{users.id}}/cropped/3000_1500/{{users.headerImage}}{% else %}/images/StayLancer_Default/staylance-6b-20150417_203458.jpg{% endif %}" class="img-responsive">
{% endif %}
<div data-v-afd21daa="" class="pull-user">
{% if users.livingStatus == 3 %}<div data-v-93fe32ce="" class="pull-user"><img data-v-93fe32ce="" src="/images/family.png" class="positionuser"></div>{% endif %}
{% if users.livingStatus == 1 %}<div data-v-93fe32ce="" class="pull-user"><img data-v-93fe32ce="" src="/images/Single.svg" class="positionuser"></div>{% endif %}
{% if users.livingStatus == 2 %}<div data-v-93fe32ce="" class="pull-user"><img data-v-93fe32ce="" src="/images/couple.png" class="positionuser"></div>{% endif %}
{% if users.livingStatus == 4 %}<div data-v-93fe32ce="" class="pull-user"><img data-v-93fe32ce="" src="/images/home.png" class="positionuser"></div>{% endif %}
</div>
<div data-v-afd21daa="" class="white-profile-box"><img data-v-afd21daa="" src="{% if users.profileImage is defined and users.profileImage is not empty %}{{api_entrypoint}}uploads/profile_pic/{{users.profileImage}}{% else %} /images/staylancer_placerholder_rd.png {% endif %}" class="img-responsive rounded-pic cus-height"></div>
}
// line 45
echo " <div data-v-afd21daa=\"\" class=\"pull-user\">
";
// line 46
if ((twig_get_attribute($this->env, $this->source, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 46, $this->source); })()), "livingStatus", [], "any", false, false, false, 46) == 3)) {
echo "<div data-v-93fe32ce=\"\" class=\"pull-user\"><img data-v-93fe32ce=\"\" src=\"/images/family.png\" class=\"positionuser\"></div>";
}
// line 47
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 47, $this->source); })()), "livingStatus", [], "any", false, false, false, 47) == 1)) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
</div>
</div>
</div>
";
// line 107
$this->displayBlock('body', $context, $blocks);
// line 109
$this->displayBlock('footer', $context, $blocks);
// line 190
$this->displayBlock('stylesheets', $context, $blocks);
// line 192
}
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();
$macros = $this->macros;
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "profile/profile.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "profile/profile.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
}
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 (!$this->container->has('twig')) {
throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*/
/**
* Renders a view.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
if (null === $response) {
$response = new Response();
}
$smoking = false;
if(!empty($user['smoking']) || !empty($user['drinking']) || !empty($user['healthyLifestyle']) || !empty($user['workingOut']) || !empty($user['mindfulness']) || !empty($user['partying'])|| !empty($user['isDrivingLicence']) || !empty($user['isFoodAllergy']) || !empty($user['foodAllergyDetail'])|| !empty($user['isMedicalRequirement']) || !empty($user['isDietaryRequirement'])|| !empty($user['foods']) || !empty($user['musics'])|| !empty($user['iEat']) || !empty($user['hobbies'])|| !empty($user['iEmbrace']) )
{
$smoking = true;
}
return $this->render('profile/profile.html.twig',
["users" => $user, 'membership' => $membership, 'userRequests' => $userRequests, 'profileId' => $id, 'user' => $users, "smoking" => $smoking,]);
}
/**
* @Route("/userhostprofile/{id}", name="userHostProfile")
$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);
$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 (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
RuntimeError
|
---|
Twig\Error\RuntimeError: Impossible to access an attribute ("livingStatus") on a boolean variable (""). at templates/profile/profile.html.twig:46 at twig_get_attribute() (var/cache/prod/twig/47/475deea31d01c9dbae050ab603ae1246.php:232) at __TwigTemplate_15d21c8a60f1715696c4894853a6ed20->block_body() (vendor/twig/twig/src/Template.php:171) at Twig\Template->displayBlock() (var/cache/prod/twig/24/240b7411087d02b330f7a0b5edde0cef.php:286) at __TwigTemplate_ac768c3f0ea28ec7ffde63ba4bd5d54d->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (var/cache/prod/twig/47/475deea31d01c9dbae050ab603ae1246.php:47) at __TwigTemplate_15d21c8a60f1715696c4894853a6ed20->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:258) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:266) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/ProfileController.php:179) at App\Controller\ProfileController->userStayProfile() (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() (public/index.php:29) |