Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Warning: Array to string conversion

Exception

ErrorException

  1.     }
  2.     public function display(array $context, array $blocks = []): void
  3.     {
  4.         foreach ($this->yield($context$blocks) as $data) {
  5.             echo $data;
  6.         }
  7.     }
  8.     public function render(array $context): string
  9.     {
Template->display(array('sliders' => array(), 'products' => array(), 'topProducts' => array(object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit)), 'max' => 200.0, 'exist_banner1' => true, 'exist_banner2' => true)) in C:\laragon\www\sunshine-elegance\vendor\twig\twig\src\Template.php (line 358)
  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.                 }
Template->render(array('sliders' => array(), 'products' => array(), 'topProducts' => array(object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit)), 'max' => 200.0, 'exist_banner1' => true, 'exist_banner2' => true)) in C:\laragon\www\sunshine-elegance\vendor\twig\twig\src\TemplateWrapper.php (line 51)
  1.         yield from $this->template->yieldBlock($name$context);
  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
TemplateWrapper->render(array('sliders' => array(), 'products' => array(), 'topProducts' => array(object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit)), 'max' => 200.0, 'exist_banner1' => true, 'exist_banner2' => true)) in C:\laragon\www\sunshine-elegance\vendor\twig\twig\src\Environment.php (line 320)
  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.      *
Environment->render('front/home.html.twig', array('sliders' => array(), 'products' => array(), 'topProducts' => array(object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit)), 'max' => 200.0, 'exist_banner1' => true, 'exist_banner2' => true)) in C:\laragon\www\sunshine-elegance\vendor\symfony\framework-bundle\Controller\AbstractController.php (line 258)
  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.      */
AbstractController->renderView('front/home.html.twig', array('sliders' => array(), 'products' => array(), 'topProducts' => array(object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit), object(Produit)), 'max' => 200.0, 'exist_banner1' => true, 'exist_banner2' => true)) in C:\laragon\www\sunshine-elegance\vendor\symfony\framework-bundle\Controller\AbstractController.php (line 266)
  1.     /**
  2.      * Renders a view.
  3.      */
  4.     protected function render(string $view, array $parameters = [], ?Response $response null): Response
  5.     {
  6.         $content $this->renderView(