Exceptions

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

Exception

Twig\Error\ RuntimeError

  1.             </td>
  2.         </tr>
  3.     </table>
  4.     <table class="table" border="0" style="margin-top: 10px">
  5.         <tr>
  6.             <td><u><h4>Point de {{ client.nom  }} de {{ dateDebut | date('d/m/Y') }} Ã  {{ dateFin | date('d/m/Y') }}</h4></u></td>
  7.         </tr>
  8.     </table>
  9.     <table class="table-body" border="0" style="width: 100%">
  10.         <tr>
  11.             <th class="table-head-th-bg" width="60">{{ 'admin.number' | trans }}</th>
  1.     </table>
  2.     <table class=\"table\" border=\"0\" style=\"margin-top: 10px\">
  3.         <tr>
  4.             <td><u><h4>Point de ";
  5.         // line 173
  6.         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 173, $this->source); })()), "nom", [], "any", false, false, false, 173), "html", null, true);
  7.         echo " de ";
  8.         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, (isset($context["dateDebut"]) || array_key_exists("dateDebut", $context) ? $context["dateDebut"] : (function () { throw new RuntimeError('Variable "dateDebut" does not exist.', 173, $this->source); })()), "d/m/Y"), "html", null, true);
  9.         echo " Ã  ";
  10.         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, (isset($context["dateFin"]) || array_key_exists("dateFin", $context) ? $context["dateFin"] : (function () { throw new RuntimeError('Variable "dateFin" does not exist.', 173, $this->source); })()), "d/m/Y"), "html", null, true);
  11.         echo "</h4></u></td>
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/AdminController.php (line 1206)
  1.            'boutique' => $boutique,
  2.            'client' => $client,
  3.            'invoices' => $invoices,
  4.            'dateDebut' => $dateDebut,
  5.            'dateFin' => $dateFin,
  6.            'userBoutique' => $userBoutique,
  7.         ]);
  8.     }
  9.     //Proposals
  10.     /**
in vendor/symfony/http-kernel/HttpKernel.php -> imprimerPointParClientAction (line 153)
  1.         $this->dispatcher->dispatch($event, KernelEvents::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($event, KernelEvents::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 35)
  1. $app = $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/harmony/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. };

Stack Trace

RuntimeError
Twig\Error\RuntimeError:
Impossible to access an attribute ("nom") on a null variable.

  at templates/pdf/point_par_client.html.twig:173
  at twig_get_attribute()
     (var/cache/dev/twig/40/40dcd5ab8a84c1972fea5815b330093fc22b85d3fb8f3c7f145ff9fe1f29712d.php:257)
  at __TwigTemplate_017c58eabc1fe602cbe3f9a67e5e5fd933252c89b5222af2759cbe0745026eb0->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:277)
  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/AdminController.php:1206)
  at App\Controller\AdminController->imprimerPointParClientAction()
     (vendor/symfony/http-kernel/HttpKernel.php:153)
  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()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:35)
  at require_once('/home/harmony/public_html/vendor/autoload_runtime.php')
     (public/index.php:5)