TypeError
App\Model\Catalog\CatalogModel::getPath(): Argument #1 ($section) must be of type App\Entity\Iblock\CatalogSection, null given, called in /var/www/ursus/data/www/ursus.ru/zend/src/App/Handler/Catalog/ProductHandler.php on line 87 TypeError thrown with message "App\Model\Catalog\CatalogModel::getPath(): Argument #1 ($section) must be of type App\Entity\Iblock\CatalogSection, null given, called in /var/www/ursus/data/www/ursus.ru/zend/src/App/Handler/Catalog/ProductHandler.php on line 87" Stacktrace: #47 TypeError in /var/www/ursus/data/www/ursus.ru/zend/src/App/Model/Catalog/CatalogModel.php:210 #46 App\Model\Catalog\CatalogModel:getPath in /var/www/ursus/data/www/ursus.ru/zend/src/App/Handler/Catalog/ProductHandler.php:87 #45 App\Handler\Catalog\ProductHandler:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Middleware/RequestHandlerMiddleware.php:53 #44 Zend\Stratigility\Middleware\RequestHandlerMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #43 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Route.php:100 #42 Zend\Expressive\Router\Route:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/RouteResult.php:110 #41 Zend\Expressive\Router\RouteResult:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/DispatchMiddleware.php:35 #40 Zend\Expressive\Router\Middleware\DispatchMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #39 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #38 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/PopupMiddleware.php:37 #37 App\Middleware\PopupMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #36 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #35 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/GeolocationMiddleware.php:34 #34 App\Middleware\GeolocationMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #33 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #32 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/BitrixMiddleware.php:54 #31 App\Middleware\BitrixMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #30 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #29 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/RedirectMiddleware.php:58 #28 App\Middleware\RedirectMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #27 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #26 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-helpers/src/UrlHelperMiddleware.php:45 #25 Zend\Expressive\Helper\UrlHelperMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #24 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #23 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/MethodNotAllowedMiddleware.php:51 #22 Zend\Expressive\Router\Middleware\MethodNotAllowedMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #21 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #20 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitOptionsMiddleware.php:70 #19 Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #18 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #17 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitHeadMiddleware.php:84 #16 Zend\Expressive\Router\Middleware\ImplicitHeadMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #15 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #14 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/RouteMiddleware.php:54 #13 Zend\Expressive\Router\Middleware\RouteMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #12 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #11 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-helpers/src/ServerUrlMiddleware.php:37 #10 Zend\Expressive\Helper\ServerUrlMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #9 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #8 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Middleware/ErrorHandler.php:143 #7 Zend\Stratigility\Middleware\ErrorHandler:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:46 #6 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php:60 #5 Zend\Stratigility\Next:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php:83 #4 Zend\Stratigility\MiddlewarePipe:process in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php:72 #3 Zend\Stratigility\MiddlewarePipe:handle in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php:95 #2 Zend\HttpHandlerRunner\RequestHandlerRunner:run in /var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Application.php:81 #1 Zend\Expressive\Application:run in /var/www/ursus/data/www/ursus.ru/index.php:29 #0 {closure} in /var/www/ursus/data/www/ursus.ru/index.php:30
Stack frames (48)
47
TypeError
/src/App/Model/Catalog/CatalogModel.php210
46
App\Model\Catalog\CatalogModel getPath
/src/App/Handler/Catalog/ProductHandler.php87
45
App\Handler\Catalog\ProductHandler handle
/vendor/zendframework/zend-stratigility/src/Middleware/RequestHandlerMiddleware.php53
44
Zend\Stratigility\Middleware\RequestHandlerMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
43
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-expressive-router/src/Route.php100
42
Zend\Expressive\Router\Route process
/vendor/zendframework/zend-expressive-router/src/RouteResult.php110
41
Zend\Expressive\Router\RouteResult process
/vendor/zendframework/zend-expressive-router/src/Middleware/DispatchMiddleware.php35
40
Zend\Expressive\Router\Middleware\DispatchMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
39
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
38
Zend\Stratigility\Next handle
/src/App/Middleware/PopupMiddleware.php37
37
App\Middleware\PopupMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
36
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
35
Zend\Stratigility\Next handle
/src/App/Middleware/GeolocationMiddleware.php34
34
App\Middleware\GeolocationMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
33
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
32
Zend\Stratigility\Next handle
/src/App/Middleware/BitrixMiddleware.php54
31
App\Middleware\BitrixMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
30
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
29
Zend\Stratigility\Next handle
/src/App/Middleware/RedirectMiddleware.php58
28
App\Middleware\RedirectMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
27
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
26
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-helpers/src/UrlHelperMiddleware.php45
25
Zend\Expressive\Helper\UrlHelperMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
24
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
23
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-router/src/Middleware/MethodNotAllowedMiddleware.php51
22
Zend\Expressive\Router\Middleware\MethodNotAllowedMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
21
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
20
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitOptionsMiddleware.php70
19
Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
18
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
17
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitHeadMiddleware.php84
16
Zend\Expressive\Router\Middleware\ImplicitHeadMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
15
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
14
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-router/src/Middleware/RouteMiddleware.php54
13
Zend\Expressive\Router\Middleware\RouteMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
12
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
11
Zend\Stratigility\Next handle
/vendor/zendframework/zend-expressive-helpers/src/ServerUrlMiddleware.php37
10
Zend\Expressive\Helper\ServerUrlMiddleware process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
9
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
8
Zend\Stratigility\Next handle
/vendor/zendframework/zend-stratigility/src/Middleware/ErrorHandler.php143
7
Zend\Stratigility\Middleware\ErrorHandler process
/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php46
6
Zend\Expressive\Middleware\LazyLoadingMiddleware process
/vendor/zendframework/zend-stratigility/src/Next.php60
5
Zend\Stratigility\Next handle
/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php83
4
Zend\Stratigility\MiddlewarePipe process
/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php72
3
Zend\Stratigility\MiddlewarePipe handle
/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php95
2
Zend\HttpHandlerRunner\RequestHandlerRunner run
/vendor/zendframework/zend-expressive/src/Application.php81
1
Zend\Expressive\Application run
/var/www/ursus/data/www/ursus.ru/index.php29
0
{closure}
/var/www/ursus/data/www/ursus.ru/index.php30
/var/www/ursus/data/www/ursus.ru/zend/src/App/Model/Catalog/CatalogModel.php
        })->get();
        
        if($collection = $sections[$sectionId]){
            foreach ($collection as $s) {
                $section = (new CatalogSection());
                $section->setId($s['id']);
                $section->setUrl($s['url']);
                $section->setName($s['name']);
 
                if ($picture = $s['picture']) {
                    $section->setImage($picture);
                }
 
                $subsections->add($section);
            }                
        }
           
    }
 
    public function getPath(CatalogSection $section, bool $checkActive = false): EO_CatalogSection_Collection
    {
        $res = CatalogSectionTable::getList([
            'filter' => [
                '<DEPTH_LEVEL' => $section->getDepthLevel(),
                '<LEFT_MARGIN' => $section->getLeftMargin(),
            ],
            'select' => ['NAME', 'URL', 'ACTIVE', 'ID', 'DEPTH_LEVEL'],
            'order'  => ['LEFT_MARGIN' => 'DESC'],
        ]);
 
        $level = $section->getDepthLevel() - 1;
        $path = [];
        while ($res && $r = $res->fetchObject()) {
            if ($checkActive && !$r->getActive()) {//если по пути к папке есть неактивные
                throw new EntityNotFound(CatalogSectionTable::class);
            }
            if ($level == $r->getDepthLevel()) {
                $path[] = $r;
                $level--;
            }
/var/www/ursus/data/www/ursus.ru/zend/src/App/Handler/Catalog/ProductHandler.php
    }

    public function handle(ServerRequestInterface $request): ResponseInterface
    {

        // check if we have a valid code
        if (!$product = $this->productCardModel->checkElementCode($request->getAttribute('product'))) {
            // Missing such product.. raise 404 error
            return $this->page404();
        }
        // check for a trailing slash
        if ($path = $this->isNeedRedirect($request)) {
            // Missing trailing slash.. redirect with 301 error
            return $this->redirect($path, 301);
        }
           
        //хлебные крошки      
        if($sectionId = $product->getIblockSectionId()){
            $section = $this->catalogModel->getSectionById($sectionId);
            $breadcrumbs = $this->catalogModel->getPath($section);
            $breadcrumbs->add($section);
        }

        //товары
        $product = $this->productCardModel->getForDetailPage(
            $product->getId(),
            [
                'select' => [
                    '*',
                    'PICTURE.*',
                    'PICTURE.PATH',
                    'PRODUCT.*',
                    'FRONT_PICTURE.ID',
                    'FRONT_PICTURE.PATH',
                    #'DETAIL_PAGE_URL',
                    CatalogPropertyMap::LABEL_KLIMATICHESKIY_KLASS_4,
                    CatalogPropertyMap::LABEL_KLASS_ZASHCHITY_3,
                    CatalogPropertyMap::USLUGA_NANESENIE_LOGOTIPOV,
                    CatalogPropertyMap::PREORDER_PRICE,
                    CatalogPropertyMap::KOL_VO_V_UPAKOVKE,
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Middleware/RequestHandlerMiddleware.php
 
    public function __construct(RequestHandlerInterface $handler)
    {
        $this->handler = $handler;
    }
 
    /**
     * Proxies to decorated handler to handle the request.
     */
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        return $this->handler->handle($request);
    }
 
    /**
     * Proxies to decorated handler to handle the request.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        return $this->handler->handle($request);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Route.php
        string $name = null
    ) {
        $this->path       = $path;
        $this->middleware = $middleware;
        $this->methods    = is_array($methods) ? $this->validateHttpMethods($methods) : $methods;
 
        if (! $name) {
            $name = $this->methods === self::HTTP_METHOD_ANY
                ? $path
                : $path . '^' . implode(self::HTTP_METHOD_SEPARATOR, $this->methods);
        }
        $this->name = $name;
    }
 
    /**
     * Proxies to the middleware composed during instantiation.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        return $this->middleware->process($request, $handler);
    }
 
    public function getPath() : string
    {
        return $this->path;
    }
 
    /**
     * Set the route name.
     */
    public function setName(string $name) : void
    {
        $this->name = $name;
    }
 
    public function getName() : string
    {
        return $this->name;
    }
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/RouteResult.php
        $result->allowedMethods = $methods;
 
        return $result;
    }
 
    /**
     * Process the result as middleware.
     *
     * If the result represents a failure, it passes handling to the handler.
     *
     * Otherwise, it processes the composed middleware using the provide request
     * and handler.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        if ($this->isFailure()) {
            return $handler->handle($request);
        }
 
        return $this->getMatchedRoute()->process($request, $handler);
    }
 
    /**
     * Does the result represent successful routing?
     */
    public function isSuccess() : bool
    {
        return $this->success;
    }
 
    /**
     * Retrieve the route that resulted in the route match.
     *
     * @return false|null|Route false if representing a routing failure;
     *     null if not created via fromRoute(); Route instance otherwise.
     */
    public function getMatchedRoute()
    {
        return $this->isFailure() ? false : $this->route;
    }
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/DispatchMiddleware.php
use Zend\Expressive\Router\RouteResult;
 
/**
 * Default dispatch middleware.
 *
 * Checks for a composed route result in the request. If none is provided,
 * delegates request processing to the handler.
 *
 * Otherwise, it delegates processing to the route result.
 */
class DispatchMiddleware implements MiddlewareInterface
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $routeResult = $request->getAttribute(RouteResult::class, false);
        if (! $routeResult) {
            return $handler->handle($request);
        }
 
        return $routeResult->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/PopupMiddleware.php
    private $renderer;
    /** @var Container */
    private $container;
    
    
    public function __construct(
        TemplateRendererInterface $renderer,
        Container $sessionContainer
    )
    {
        $this->renderer   = $renderer;
        $this->container  = $sessionContainer;
    }
 
    public function process(ServerRequestInterface $psrRequest, RequestHandlerInterface $delegate): ResponseInterface
    {
        $isSubscribePopup = $this->isSubscribeForm($psrRequest);       
        $this->renderer->addDefaultParam(TemplateRendererInterface::TEMPLATE_ALL, 'isSubscribe', $isSubscribePopup);
        
        return $delegate->handle($psrRequest);
    }
 
    private function isSubscribeForm(ServerRequestInterface $request)
    {       
        if ($request->getQueryParams()['utm_source'] == "market") {
            return false;
        }
       
        if ($request->getCookieParams()['BITRIX_SM_SUBSCRIBE_FORM']) {
            if (isset($this->container->page)) {
                unset($this->container->page);
            }
            if (isset($this->container->start)) {
                unset($this->container->start);
            }
            return false;
        }
        
        //пользователь провел на сайте больше двух минут
        if (!$this->container->start) {
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/GeolocationMiddleware.php
    private $geolocationModel;
 
    const IS_BOT_REQUEST = 'IS_BOT_REQUEST';
 
    public function __construct(BitrixGeolocation $geo)
    {
        $this->geolocationModel = $geo;
    }
 
    public function process(ServerRequestInterface $psrRequest, RequestHandlerInterface $delegate): ResponseInterface
    {
        // add as global var to template enginer
        $userAgent = $psrRequest->getServerParams()['HTTP_USER_AGENT'];
        $is_bot = preg_match("~(Google|Yahoo|Rambler|Bot|Yandex|Spider|Snoopy|Crawler|Finder|Mail|curl)~i", $userAgent);
        $psrRequest = $psrRequest->withAttribute(self::IS_BOT_REQUEST, $is_bot);
        if (!$is_bot) {
            $this->geolocationModel->execute($psrRequest->getCookieParams());
            $psrRequest = $psrRequest->withAttribute(BitrixGeolocation::GEOLOCATION_ENTITY, $this->geolocationModel->getEntity());
        }
        $psrResponce = $delegate->handle($psrRequest);
        // $psrResponce->withAddedHeader('set_cookie', $value);
 
        return $psrResponce;
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/BitrixMiddleware.php
    {
        $this->psrRequest = $psrRequest;
        if (substr($psrRequest->getUri()->getPath(), 0, 14) == '/bitrix/admin/') {
            // Get bitrix instance
            require '../bitrix/modules/main/include/prolog_admin_before.php';
        } else {
            // Flag for Bitrix. Not check permissions for files (avoid .access.php files)
            define('NOT_CHECK_PERMISSIONS', true);
 
            // Get bitrix instance
            set_time_limit(5);//5 секунд на ядро
            require '../bitrix/modules/main/include/prolog_before.php';
            if ($uri = $this->checkLogout($psrRequest)) {
                return new RedirectResponse($uri, 302);
            }
            set_time_limit(30);//30 на скрипт
        }
 
        
        $response = $delegate->handle($psrRequest);
        
        #\Bitrix\Main\Context::getCurrent()->getResponse()->flush("");
        #echo $response->getBody()->getContents();die();
        return $response;
    }
 
    public function getContainer()
    {
        return $this->container;
    }
 
    /**
     * @throws \Exception
     */
    public function eventDispath()
    {
        $this->registerEvents(EventManager::LIST_ALL);
 
        if (strpos($_SERVER['PHP_SELF'], BX_ROOT . "/admin/1c_exchange.php") === 0) {
            $this->registerEvents(EventManager::LIST_EXCHANGE);
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/src/App/Middleware/RedirectMiddleware.php
        if (!$psrRequest->getAttribute(\Zend\Expressive\Router\RouteResult::class, false)) {
            // raise 404 error
            return $delegate->process($psrRequest, $delegate);
        }

        // Probably do some checks here and then redirect
        // Add slash and redirect
        if (strlen($path) > 1) {
            if (substr($path, -1) !== '/' && !pathinfo($path, PATHINFO_EXTENSION)) {
                $path .= '/';
            }
        }

        if ($path != $uri->getPath() && !$this->isIgnoredRoute($path)) {
            return $this->redirect($path);
        }

        // continue to next middleware
        return $delegate->handle($psrRequest, $delegate);
    }

    /**
     * Проверка на жестккий редирект на конкрентный адрес (карта редиректов для SEO)
     * @param $path
     * @return bool|mixed
     */
    private function isSeoRedirect(string $path)
    {
        $go = $strLength = false;
        foreach ($this->seoRedirectMap as $from => $to) {
            $pos = strpos($path, $from);
            if ($pos !== 0) {
                continue;
            }
            $diff = substr($path, strlen($from));

            $size = strlen($diff);

            if ($size === 0) {
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-helpers/src/UrlHelperMiddleware.php
    private $helper;
 
    public function __construct(UrlHelper $helper)
    {
        $this->helper = $helper;
    }
 
    /**
     * Inject the UrlHelper instance with a RouteResult, if present as a request attribute.
     * Injects the helper, and then dispatches the next middleware.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $result = $request->getAttribute(RouteResult::class, false);
 
        if ($result instanceof RouteResult) {
            $this->helper->setRouteResult($result);
        }
 
        return $handler->handle($request);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/MethodNotAllowedMiddleware.php
class MethodNotAllowedMiddleware implements MiddlewareInterface
{
    /**
     * @var callable
     */
    private $responseFactory;
 
    public function __construct(callable $responseFactory)
    {
        // Factories is wrapped in a closure in order to enforce return type safety.
        $this->responseFactory = function () use ($responseFactory) : ResponseInterface {
            return $responseFactory();
        };
    }
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $routeResult = $request->getAttribute(RouteResult::class);
        if (! $routeResult || ! $routeResult->isMethodFailure()) {
            return $handler->handle($request);
        }
 
        return ($this->responseFactory)()
            ->withStatus(StatusCode::STATUS_METHOD_NOT_ALLOWED)
            ->withHeader('Allow', implode(',', $routeResult->getAllowedMethods()));
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitOptionsMiddleware.php
    /**
     * @param callable $responseFactory A factory capable of returning an
     *     empty ResponseInterface instance to return for implicit OPTIONS
     *     requests.
     */
    public function __construct(callable $responseFactory)
    {
        // Factories is wrapped in a closure in order to enforce return type safety.
        $this->responseFactory = function () use ($responseFactory) : ResponseInterface {
            return $responseFactory();
        };
    }
 
    /**
     * Handle an implicit OPTIONS request.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        if ($request->getMethod() !== RequestMethod::METHOD_OPTIONS) {
            return $handler->handle($request);
        }
 
        $result = $request->getAttribute(RouteResult::class);
        if (! $result) {
            return $handler->handle($request);
        }
 
        if ($result->isFailure() && ! $result->isMethodFailure()) {
            return $handler->handle($request);
        }
 
        if ($result->getMatchedRoute()) {
            return $handler->handle($request);
        }
 
        $allowedMethods = $result->getAllowedMethods();
 
        return ($this->responseFactory)()->withHeader('Allow', implode(',', $allowedMethods));
    }
}
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/ImplicitHeadMiddleware.php
    {
        $this->router = $router;
 
        // Factory is wrapped in closur in order to enforce return type safety.
        $this->streamFactory = function () use ($streamFactory) : StreamInterface {
            return $streamFactory();
        };
    }
 
    /**
     * Handle an implicit HEAD request.
     *
     * If the route allows GET requests, dispatches as a GET request and
     * resets the response body to be empty; otherwise, creates a new empty
     * response.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        if ($request->getMethod() !== RequestMethod::METHOD_HEAD) {
            return $handler->handle($request);
        }
 
        $result = $request->getAttribute(RouteResult::class);
        if (! $result) {
            return $handler->handle($request);
        }
 
        if ($result->getMatchedRoute()) {
            return $handler->handle($request);
        }
 
        $routeResult = $this->router->match($request->withMethod(RequestMethod::METHOD_GET));
        if ($routeResult->isFailure()) {
            return $handler->handle($request);
        }
 
        // Copy matched parameters like RouteMiddleware does
        foreach ($routeResult->getMatchedParams() as $param => $value) {
            $request = $request->withAttribute($param, $value);
        }
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-router/src/Middleware/RouteMiddleware.php
 
    public function __construct(RouterInterface $router)
    {
        $this->router = $router;
    }
 
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $result = $this->router->match($request);
 
        // Inject the actual route result, as well as individual matched parameters.
        $request = $request->withAttribute(RouteResult::class, $result);
 
        if ($result->isSuccess()) {
            foreach ($result->getMatchedParams() as $param => $value) {
                $request = $request->withAttribute($param, $value);
            }
        }
 
        return $handler->handle($request);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive-helpers/src/ServerUrlMiddleware.php
{
    /**
     * @var ServerUrlHelper
     */
    private $helper;
 
    public function __construct(ServerUrlHelper $helper)
    {
        $this->helper = $helper;
    }
 
    /**
     * Inject the ServerUrlHelper instance with the request URI.
     * Injects the ServerUrlHelper with the incoming request URI, and then invoke
     * the next middleware.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $this->helper->setUri($request->getUri());
        return $handler->handle($request);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Middleware/ErrorHandler.php
 
    /**
     * Middleware to handle errors and exceptions in layers it wraps.
     *
     * Adds an error handler that will convert PHP errors to ErrorException
     * instances.
     *
     * Internally, wraps the call to $next() in a try/catch block, catching
     * all PHP Throwables.
     *
     * When an exception is caught, an appropriate error response is created
     * and returned instead; otherwise, the response returned by $next is
     * used.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        set_error_handler($this->createErrorHandler());
 
        try {
            $response = $handler->handle($request);
        } catch (Throwable $e) {
            $response = $this->handleThrowable($e, $request);
        }
 
        restore_error_handler();
 
        return $response;
    }
 
    /**
     * Handles all throwables, generating and returning a response.
     *
     * Passes the error, request, and response prototype to createErrorResponse(),
     * triggers all listeners with the same arguments (but using the response
     * returned from createErrorResponse()), and then returns the response.
     */
    private function handleThrowable(Throwable $e, ServerRequestInterface $request) : ResponseInterface
    {
        $generator = $this->responseGenerator;
        $response = $generator($e, $request, ($this->responseFactory)());
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php
     * @var string
     */
    private $middlewareName;
 
    public function __construct(
        MiddlewareContainer $container,
        string $middlewareName
    ) {
        $this->container = $container;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        $middleware = $this->container->get($this->middlewareName);
        return $middleware->process($request, $handler);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/Next.php
        $this->queue           = clone $queue;
        $this->fallbackHandler = $fallbackHandler;
    }
 
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        if ($this->queue === null) {
            throw MiddlewarePipeNextHandlerAlreadyCalledException::create();
        }
 
        if ($this->queue->isEmpty()) {
            $this->queue = null;
            return $this->fallbackHandler->handle($request);
        }
 
        $middleware = $this->queue->dequeue();
        $next = clone $this; // deep clone is not used intentionally
        $this->queue = null; // mark queue as processed at this nesting level
 
        return $middleware->process($request, $next);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php
     * If the pipeline is empty at the time this method is invoked, it will
     * raise an exception.
     *
     * @throws Exception\EmptyPipelineException if no middleware is present in
     *     the instance in order to process the request.
     */
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        return $this->process($request, new EmptyPipelineHandler(__CLASS__));
    }
 
    /**
     * PSR-15 middleware invocation.
     *
     * Executes the internal pipeline, passing $handler as the "final
     * handler" in cases when the pipeline exhausts itself.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        return (new Next($this->pipeline, $handler))->handle($request);
    }
 
    /**
     * Attach middleware to the pipeline.
     */
    public function pipe(MiddlewareInterface $middleware) : void
    {
        $this->pipeline->enqueue($middleware);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php
    }
 
    /**
     * Handle an incoming request.
     *
     * Attempts to handle an incoming request by doing the following:
     *
     * - Cloning itself, to produce a request handler.
     * - Dequeuing the first middleware in the cloned handler.
     * - Processing the first middleware using the request and the cloned handler.
     *
     * If the pipeline is empty at the time this method is invoked, it will
     * raise an exception.
     *
     * @throws Exception\EmptyPipelineException if no middleware is present in
     *     the instance in order to process the request.
     */
    public function handle(ServerRequestInterface $request) : ResponseInterface
    {
        return $this->process($request, new EmptyPipelineHandler(__CLASS__));
    }
 
    /**
     * PSR-15 middleware invocation.
     *
     * Executes the internal pipeline, passing $handler as the "final
     * handler" in cases when the pipeline exhausts itself.
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        return (new Next($this->pipeline, $handler))->handle($request);
    }
 
    /**
     * Attach middleware to the pipeline.
     */
    public function pipe(MiddlewareInterface $middleware) : void
    {
        $this->pipeline->enqueue($middleware);
    }
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php
        $this->serverRequestErrorResponseGenerator =
            function (Throwable $exception) use ($serverRequestErrorResponseGenerator) : ResponseInterface {
                return $serverRequestErrorResponseGenerator($exception);
            };
    }
 
    /**
     * Run the application
     */
    public function run() : void
    {
        try {
            $request = ($this->serverRequestFactory)();
        } catch (Throwable $e) {
            // Error in generating the request
            $this->emitMarshalServerRequestException($e);
            return;
        }
 
        $response = $this->handler->handle($request);
 
        $this->emitter->emit($response);
    }
 
    private function emitMarshalServerRequestException(Throwable $exception) : void
    {
        $response = ($this->serverRequestErrorResponseGenerator)($exception);
        $this->emitter->emit($response);
    }
}
 
/var/www/ursus/data/www/ursus.ru/zend/vendor/zendframework/zend-expressive/src/Application.php
        return $this->pipeline->handle($request);
    }
 
    /**
     * Proxies to composed pipeline to process.
     * {@inheritDocs}
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
    {
        return $this->pipeline->process($request, $handler);
    }
 
    /**
     * Run the application.
     *
     * Proxies to the RequestHandlerRunner::run() method.
     */
    public function run() : void
    {
        $this->runner->run();
    }
 
    /**
     * Pipe middleware to the pipeline.
     *
     * If two arguments are present, they are passed to pipe(), after first
     * passing the second argument to the factory's prepare() method.
     *
     * If only one argument is presented, it is passed to the factory prepare()
     * method.
     *
     * The resulting middleware, in both cases, is piped to the pipeline.
     *
     * @param string|array|callable|MiddlewareInterface|RequestHandlerInterface $middlewareOrPath
     *     Either the middleware to pipe, or the path to segregate the $middleware
     *     by, via a PathMiddlewareDecorator.
     * @param null|string|array|callable|MiddlewareInterface|RequestHandlerInterface $middleware
     *     If present, middleware or request handler to segregate by the path
     *     specified in $middlewareOrPath.
     */
/var/www/ursus/data/www/ursus.ru/index.php
chdir('zend');
require 'vendor/autoload.php';
 
/**
 * Self-called anonymous function that creates its own scope and keep the global namespace clean.
 */
(function () {
    /** @var \Psr\Container\ContainerInterface $container */
    $container = require 'config/container.php';
 
    /** @var \Zend\Expressive\Application $app */
    $app = $container->get(\Zend\Expressive\Application::class);
    $factory = $container->get(\Zend\Expressive\MiddlewareFactory::class);
 
    // Execute programmatic/declarative middleware pipeline and routing
    // configuration statements
    (require 'config/pipeline.php')($app, $factory, $container);
    (require 'config/routes.php')($app, $factory, $container);
 
    $app->run();
})();
/var/www/ursus/data/www/ursus.ru/index.php
require 'vendor/autoload.php';
 
/**
 * Self-called anonymous function that creates its own scope and keep the global namespace clean.
 */
(function () {
    /** @var \Psr\Container\ContainerInterface $container */
    $container = require 'config/container.php';
 
    /** @var \Zend\Expressive\Application $app */
    $app = $container->get(\Zend\Expressive\Application::class);
    $factory = $container->get(\Zend\Expressive\MiddlewareFactory::class);
 
    // Execute programmatic/declarative middleware pipeline and routing
    // configuration statements
    (require 'config/pipeline.php')($app, $factory, $container);
    (require 'config/routes.php')($app, $factory, $container);
 
    $app->run();
})();

Environment & details:

Key Value
HTTP Method GET
URI https://www.ursus.ru/catalogue/product/botinki_norfin_mission_brown/
Script /index.php
Headers Array ( [host] => Array ( [0] => www.ursus.ru ) [x-forwarded-for] => Array ( [0] => 54.173.43.215 ) [x-forwarded-proto] => Array ( [0] => https ) [x-forwarded-port] => Array ( [0] => 443 ) [connection] => Array ( [0] => close ) [x-qrator-requestid] => Array ( [0] => 3db5fb8c5aec2348e1df612c09efbafd ) [x-qrator-ip-source] => Array ( [0] => 54.173.43.215 ) [x-qrator-tcp-info] => Array ( [0] => 45710, 24141, 26205 ) [x-q-domid] => Array ( [0] => 17763 ) [accept] => Array ( [0] => */* ) [user-agent] => Array ( [0] => claudebot ) )
Cookies Array ( )
Attributes Array ( )
Query String Arguments Array ( )
Body Params Array ( )
empty
empty
empty
empty
Key Value
SESS_AUTH Array ( [POLICY] => Array ( [SESSION_TIMEOUT] => 43200 [SESSION_IP_MASK] => 0.0.0.0 [MAX_STORE_NUM] => 10 [STORE_IP_MASK] => 0.0.0.0 [STORE_TIMEOUT] => 525600 [CHECKWORD_TIMEOUT] => 2880 [PASSWORD_LENGTH] => 6 [PASSWORD_UPPERCASE] => N [PASSWORD_LOWERCASE] => N [PASSWORD_DIGITS] => N [PASSWORD_PUNCTUATION] => N [PASSWORD_CHECK_WEAK] => N [PASSWORD_CHECK_POLICY] => N [PASSWORD_CHANGE_DAYS] => 0 [PASSWORD_UNIQUE_COUNT] => 0 [LOGIN_ATTEMPTS] => 0 [BLOCK_LOGIN_ATTEMPTS] => 0 [BLOCK_TIME] => 0 ) )
SESS_IP
SESS_TIME 1711615939
IS_EXPIRED
BX_SESSION_SIGN 301b0ccc957262bd2da04911edef703f
fixed_session_id 06a43d4673bd3774b67013629e0bc76e
IPOLSDEK_MODULE_TOKEN e5936adc7e4720311ed5f5e38778acf7649c7d30f367c387f49c1c1e60d34a5a
IPOLSDEK_WIDGET_TOKEN 02faa33565afedae7997291edfa75c323d2e3e5719ff6f734996072c8d217eee
App\Middleware\PopupMiddleware Zend\Stdlib\ArrayObject Object ( [storage:protected] => Array ( [start] => 1711615939 ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) )
Key Value
REDIRECT_HTTPS on
REDIRECT_STATUS 200
HTTPS on
REMOTE_USER
HTTP_HOST www.ursus.ru
HTTP_X_FORWARDED_FOR 54.173.43.215
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_PORT 443
HTTP_CONNECTION close
HTTP_X_QRATOR_REQUESTID 3db5fb8c5aec2348e1df612c09efbafd
HTTP_X_QRATOR_IP_SOURCE 54.173.43.215
HTTP_X_QRATOR_TCP_INFO 45710, 24141, 26205
HTTP_X_Q_DOMID 17763
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE <address>Apache/2.4.56 (Debian) Server at www.ursus.ru Port 80</address>
SERVER_SOFTWARE Apache/2.4.56 (Debian)
SERVER_NAME www.ursus.ru
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR
DOCUMENT_ROOT /var/www/ursus/data/www/ursus.ru
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /var/www/ursus/data/www/ursus.ru
SERVER_ADMIN zakaz@ursu.ru
SCRIPT_FILENAME /var/www/ursus/data/www/ursus.ru/index.php
REMOTE_PORT 42674
REDIRECT_URL /catalogue/product/botinki_norfin_mission_brown/
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /catalogue/product/botinki_norfin_mission_brown/
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711615939.1865
REQUEST_TIME 1711615939
empty
0. Whoops\Handler\PrettyPageHandler