https://mixform.pl/uk/catalog/cat-438-busini-steklyannie-pressovannie-crystal-art

Exceptions

Warning: Undefined array key 438

Exception

ErrorException

  1.     public function getCatTreeWhere($start)
  2.     {
  3.         $cats $this->cat_tree;
  4.         $i 0;
  5.         if (count($cats[$start]) < 1) {
  6.             $q "(cat = $start)";
  7.         } else {
  8.             $q "(";
  9.             foreach ($cats[$start] as $k => $cat) {
  10.                 if ($i++ > 0) {
Cats->getCatTreeWhere(438) in src/Service/Filter/Prods.php (line 56)
  1.         $opt $this->Auth->isOpt() ? 'opt' '';
  2.         $where "visible = 1 and (num > 0 or num2 > 0 or num3 > 0)";
  3.     
  4.         if ($cat) {
  5.             $where .= " and ".$this->Cats->getCatTreeWhere($cat);
  6.         }
  7.         
  8.         switch($spec) {
  9.             case 'new':
  10.                 $where .= " and `new` = 1";            
Prods->getFromDb(438, '', null) in src/Service/Filter/Prods.php (line 164)
  1.     }   
  2.     public function getProds(int $cat 0string $spec ''string $search ''): array
  3.     {
  4.         if (empty($this->prods)) {
  5.             return $this->getFromDb($cat$spec$search);
  6.         }
  7.         return $this->prods;
  8.     }   
Prods->getProds(438, '', '') in src/Controller/CatalogController.php (line 174)
  1.         $results $session->get('results') ?? 30;
  2.         $start = (int) $request->query->get('start');
  3.         $view_mode $request->get('view') ?? $request->cookies->get('view_mode') ?? 'list';
  4.         $prods $ModelProd->getProds($cat_id$spec$request->get('q'''));
  5.         if ($spec) {
  6.             $page $this->Pages->findOneBy(['intname' => 'catalog/' $spec]);
  7.         } else {
  8.             $page $this->Pages->findOneBy(['intname' => 'catalog']);
  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.         if (!IpUtils::checkIp('127.0.0.1'$trustedProxies)) {
  2.             Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3.         }
  4.         try {
  5.             return $kernel->handle($request$type$catch);
  6.         } finally {
  7.             // restore global state
  8.             Request::setTrustedProxies($trustedProxies$trustedHeaderSet);
  9.         }
  10.     }
  1.         if ($this->surrogate) {
  2.             $this->surrogate->addSurrogateCapability($request);
  3.         }
  4.         // always a "master" request (as the real master request can be in cache)
  5.         $response SubRequestHandler::handle($this->kernel$requestHttpKernelInterface::MAIN_REQUEST$catch);
  6.         /*
  7.          * Support stale-if-error given on Responses or as a config option.
  8.          * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9.          * Cache-Control directives) that
  1.     protected function forward(Request $requestbool $catch falseResponse $entry null): Response
  2.     {
  3.         $this->getKernel()->boot();
  4.         $this->getKernel()->getContainer()->set('cache'$this);
  5.         return parent::forward($request$catch$entry);
  6.     }
  7.     /**
  8.      * Returns an array of options to customize the Cache configuration.
  9.      */
  1.         // avoid that the backend sends no content
  2.         $subRequest->headers->remove('If-Modified-Since');
  3.         $subRequest->headers->remove('If-None-Match');
  4.         $response $this->forward($subRequest$catch);
  5.         if ($response->isCacheable()) {
  6.             $this->store($request$response);
  7.         }
  1.         }
  2.         if (null === $entry) {
  3.             $this->record($request'miss');
  4.             return $this->fetch($request$catch);
  5.         }
  6.         if (!$this->isFreshEnough($request$entry)) {
  7.             $this->record($request'stale');
  1.                 reload the cache by fetching a fresh response and caching it (if possible).
  2.             */
  3.             $this->record($request'reload');
  4.             $response $this->fetch($request$catch);
  5.         } else {
  6.             $response $this->lookup($request$catch);
  7.         }
  8.         $this->restoreResponseBody($request$response);
  9.         if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1.     {
  2.         if (!$this->booted) {
  3.             $container $this->container ?? $this->preBoot();
  4.             if ($container->has('http_cache')) {
  5.                 return $container->get('http_cache')->handle($request$type$catch);
  6.             }
  7.         }
  8.         $this->boot();
  9.         ++$this->requestStackSize;
  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('/var/www/mixform/data/www/mixform.pl/vendor/autoload_runtime.php') in public/index.php (line 4)
  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

ErrorException
ErrorException:
Warning: Undefined array key 438

  at src/Service/Filter/Cats.php:165
  at App\Service\Filter\Cats->getCatTreeWhere(438)
     (src/Service/Filter/Prods.php:56)
  at App\Service\Filter\Prods->getFromDb(438, '', null)
     (src/Service/Filter/Prods.php:164)
  at App\Service\Filter\Prods->getProds(438, '', '')
     (src/Controller/CatalogController.php:174)
  at App\Controller\CatalogController->prodList(object(Request), object(Session), object(Cat), object(Prods), 438, 'busini-steklyannie-pressovannie-crystal-art', '', '')
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
  at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(object(Kernel), object(Request), 1, true)
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:457)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true, null)
     (vendor/symfony/framework-bundle/HttpCache/HttpCache.php:71)
  at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward(object(Request), true)
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:430)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true)
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:328)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true)
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:212)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/var/www/mixform/data/www/mixform.pl/vendor/autoload_runtime.php')
     (public/index.php:4)