https://preprod.copees.com/fr/product-option/get-option-by-product/14

Exceptions

Notice: Undefined offset: 0

Exception

ErrorException

  1.                     $rectoverso $productAttributeDefault->getRectoverso();
  2.                 }else{
  3.                     if($product->getTypeProduct() == Product::CARTE){
  4.                         $format = isset($formats[1]) ? $formats[1] : $formats[0] ;
  5.                     }else{
  6.                         $format $formats[0];
  7.                     }
  8.                     $format_id $format['id'];
  9.                     if($product->getIsRecto()){
  10.                         $rectoverso ProductAttribute::RECTO;
NbDesigner->getOptionByProduct(object(Request), '14') in src/Controller/Front/ProductOptionController.php (line 133)
  1.     /**
  2.      * @Route("/get-option-by-product/{idProduct}", name="get_option_by_product",options={"expose"=true})
  3.      */
  4.     public function optionByProduct(Request $request,$idProduct) : Response
  5.     {
  6.         $data $this->nbDesigner->getOptionByProduct($request,$idProduct);
  7.         $responseInfoTaille $this->twig->render('front/product-option/info-taille.html.twig',$data);
  8.         $responseOption $this->twig->render('front/product-option/options-global.html.twig',$data);
  9.         $data['isFormatType'] = true;
  10.         $responseOptionFormatType $this->twig->render('front/product-option/options-global-new.html.twig',$data);
  11.         $data['isFormatType'] = false;
in vendor/symfony/http-kernel/HttpKernel.php->optionByProduct (line 151)
  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.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  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.     }
Kernel->handle(object(Request)) in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

ErrorException

ErrorException:
Notice: Undefined offset: 0

  at src/Services/NbDesigner.php:428
  at App\Services\NbDesigner->getOptionByProduct(object(Request), '14')
     (src/Controller/Front/ProductOptionController.php:133)
  at App\Controller\Front\ProductOptionController->optionByProduct(object(Request), '14')
     (vendor/symfony/http-kernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:198)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:25)