http://www.bookoach.com/en/admin/experience/exp-8/overview

Exceptions

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

  • Exception
  • Logs
  • Stack Trace

Twig\Error\ RuntimeError

  1.                                     </span>
  2.                                 </div>
  3.                                 <h5 class="font-size-14 mb-0">Promotion</h5>
  4.                             </div>
  5.                             <div class="text-muted mt-4">
  6.                                 <h4>% {{ experience.promotion.percent }} <i class="mdi mdi-chevron-up ms-1 text-success"></i></h4>
  7.                                 <div class="d-flex">
  8.                                     {% if experience.onpromo == '1' %}
  9.                                         <span class="badge badge-soft-success font-size-12"> On promo </span> <span class="ms-2 text-truncate">La promotion est activé</span>
  10.                                     {% else %}
  11.                                         <span class="badge badge-soft-danger font-size-12"> Pas de promo </span> <span class="ms-2 text-truncate">Aucun promotion actif</span>
  1.                                 <h5 class=\"font-size-14 mb-0\">Promotion</h5>
  2.                             </div>
  3.                             <div class=\"text-muted mt-4\">
  4.                                 <h4>% ";
  5.         // line 207
  6.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["experience"]) || array_key_exists("experience"$context) ? $context["experience"] : (function () { throw new RuntimeError('Variable "experience" does not exist.'207$this->source); })()), "promotion", [], "any"falsefalsefalse207), "percent", [], "any"falsefalsefalse207), "html"nulltrue);
  7.         yield " <i class=\"mdi mdi-chevron-up ms-1 text-success\"></i></h4>
  8.                                 <div class=\"d-flex\">
  9.                                     ";
  10.         // line 209
  11.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["experience"]) || array_key_exists("experience"$context) ? $context["experience"] : (function () { throw new RuntimeError('Variable "experience" does not exist.'209$this->source); })()), "onpromo", [], "any"falsefalsefalse209) == "1")) {
in vendor/twig/twig/src/Template.php -> block_content (line 430)
  1.                 }
  2.                 $level ob_get_level();
  3.                 ob_start();
  4.                 foreach ($template->$block($context$blocks) as $data) {
  5.                     if (ob_get_length()) {
  6.                         $data ob_get_clean().$data;
  7.                         ob_start();
  8.                     }
  1.         // line 214
  2.         yield Twig\Extension\CoreExtension::include($this->env$context"default/_flash_messages.html.twig");
  3.         yield "
  4.                         ";
  5.         // line 215
  6.         yield from $this->unwrap()->yieldBlock('content'$context$blocks);
  7.         // line 216
  8.         yield "                        <!-- end row -->
  9.                     </div> <!-- container-fluid -->
  10.                 </div>
  11.                 <!-- End Page-content -->
in vendor/twig/twig/src/Template.php -> doDisplay (line 360)
  1.             }
  2.             $level ob_get_level();
  3.             ob_start();
  4.             foreach ($this->doDisplay($context$blocks) as $data) {
  5.                 if (ob_get_length()) {
  6.                     $data ob_get_clean().$data;
  7.                     ob_start();
  8.                 }
  1.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""admin/experience/overview.html.twig"));
  3.         $this->parent $this->loadTemplate("admin/baseAdmin.html.twig""admin/experience/overview.html.twig"1);
  4.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  5.         
  6.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  7.         
  8.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 360)
  1.             }
  2.             $level ob_get_level();
  3.             ob_start();
  4.             foreach ($this->doDisplay($context$blocks) as $data) {
  5.                 if (ob_get_length()) {
  6.                     $data ob_get_clean().$data;
  7.                     ob_start();
  8.                 }
  1.     }
  2.     public function render(array $context): string
  3.     {
  4.         $content '';
  5.         foreach ($this->yield($context) as $data) {
  6.             $content .= $data;
  7.         }
  8.         return $content;
  9.     }
  1.         $this->template $template;
  2.     }
  3.     public function render(array $context = []): string
  4.     {
  5.         return $this->template->render($context);
  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('admin/experience/overview.html.twig', array('experience' => object(Experience))) in src/Controller/Dashboard/Admin/ExperienceController.php (line 346)
  1.     public function overview($idManagerRegistry $doctrine) {
  2.         $em $doctrine->getManager();
  3.         $experience $em->getRepository(Experience::class)->find($id);
  4.         return $this->render('admin/experience/overview.html.twig', [
  5.                     'experience' => $experience,
  6.         ]);
  7.     }
  8. }
  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.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/bookoachroot/public_html/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };