if (!$mask) {file_put_contents($pathname, $message . "\n", FILE_APPEND);
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php, line 142
Cake\Log\Engine\FileLog->log() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Log.php, line 392
Cake\Log\Log::write() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Log.php, line 477
Cake\Log\Log::warning() /var/www/shop/public_html/current/plugins/AzaFilters/src/Model/Endpoint/ProductsEndpoint.php, line 161
AzaFilters\Model\Endpoint\ProductsEndpoint->loadCachedProducts() /var/www/shop/public_html/current/src/Controller/FilteredProductsController.php, line 179
App\Controller\FilteredProductsController->App\Controller\{closure}() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309
Cake\Event\EventManager->_callListener() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286
Cake\Event\EventManager->dispatch() /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Controller/Component/CrudComponent.php, line 550
Crud\Controller\Component\CrudComponent->trigger() /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Core/ProxyTrait.php, line 51
Crud\Core\BaseObject->_trigger() /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Action/IndexAction.php, line 74
Crud\Action\IndexAction->_handle() [internal], line ??
/var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Action/BaseAction.php /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Action/BaseAction.php, line 71
Crud\Action\BaseAction->handle() /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Controller/Component/CrudComponent.php, line 244
Crud\Controller\Component\CrudComponent->execute() /var/www/shop/public_html/current/src/Controller/FilteredProductsController.php, line 277
App\Controller\FilteredProductsController->index() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Controller/Controller.php, line 560
Cake\Controller\Controller->invokeAction() /var/www/shop/public_html/current/src/Controller/AppController.php, line 419
App\Controller\AppController->invokeAction() /var/www/shop/public_html/current/vendor/friendsofcake/crud/src/Controller/ControllerTrait.php, line 80
App\Controller\CrudController->invokeAction() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 140
Cake\Controller\ControllerFactory->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 115
Cake\Controller\ControllerFactory->invoke() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 325
Cake\Http\BaseApplication->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 86
Cake\Http\Runner->handle() /var/www/shop/public_html/current/plugins/Synerise/src/Middleware/CookieMiddleware.php, line 32
Synerise\Middleware\CookieMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/CanonicalRedirectMiddleware.php, line 45
App\Middleware\CanonicalRedirectMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/VirtualQueryParamsMiddleware.php, line 33
App\Middleware\VirtualQueryParamsMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/LocaleMiddleware.php, line 31
App\Middleware\LocaleMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/SiteLockdownMiddleware.php, line 50
App\Middleware\SiteLockdownMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 86
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 145
Authentication\Middleware\AuthenticationMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 145
Authentication\Middleware\AuthenticationMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 67
Cake\Http\Runner->run() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 198
Cake\Routing\Middleware\RoutingMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/AzaFiltersFallbackMiddleware.php, line 29
App\Middleware\AzaFiltersFallbackMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157
Cake\Http\Middleware\BodyParserMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php, line 93
Cake\Http\Middleware\EncryptedCookieMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 68
Cake\Routing\Middleware\AssetMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/CleanQueryParamsMiddleware.php, line 65
App\Middleware\CleanQueryParamsMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/src/Middleware/ColonRedirectMiddleware.php, line 29
App\Middleware\ColonRedirectMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 149
Cake\Error\Middleware\ErrorHandlerMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Middleware/HttpsEnforcerMiddleware.php, line 95
Cake\Http\Middleware\HttpsEnforcerMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php, line 60
DebugKit\Middleware\DebugKitMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 67
Cake\Http\Runner->run() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 99
Cake\Http\Server->run() /var/www/shop/public_html/current/webroot/index.php, line 42
[main]
if (!$mask) {file_put_contents($pathname, $message . "\n", FILE_APPEND);
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php, line 142 Cake\Log\Engine\FileLog->log() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Log.php, line 392 Cake\Log\Log::write() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Log/Log.php, line 477 Cake\Log\Log::warning() /var/www/shop/public_html/current/vendor/cakephp/debug_kit/src/ToolbarService.php, line 304 DebugKit\ToolbarService->saveData() /var/www/shop/public_html/current/vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php, line 67 DebugKit\Middleware\DebugKitMiddleware->process() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Runner->run() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 99 Cake\Http\Server->run() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
$message = "Unable to emit headers. Headers sent in file=$file line=$line";trigger_error($message, E_USER_WARNING);}
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\ResponseEmitter->emit() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
$response->getStatusCode(),($reasonPhrase ? ' ' . $reasonPhrase : '')));
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter->emitStatusLine() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\ResponseEmitter->emit() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter->emitHeaders() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\ResponseEmitter->emit() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter->emitHeaders() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\ResponseEmitter->emit() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
if (PHP_VERSION_ID >= 70300) {return setcookie($cookie->getName(), $cookie->getScalarValue(), $cookie->getOptions());}
/var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 235 Cake\Http\ResponseEmitter->setCookie() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 218 Cake\Http\ResponseEmitter->emitCookies() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 206 Cake\Http\ResponseEmitter->emitHeaders() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\ResponseEmitter->emit() /var/www/shop/public_html/current/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/shop/public_html/current/webroot/index.php, line 42 [main]
CORE/src/Error/Renderer/HtmlErrorRenderer.php on line 37
📋
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
Please try correcting the issue for the following table aliases:
$this->headerSentInfo['line'] |
|
); |
|
} |
|
|
|
throw new CakeException($message); |
|
} |
|
|
|
if (!is_array($name)) { |
|
$name = [$name => $value]; |
if ($request->getParam('controller') === 'Users' && \in_array($action, $disabledActions, true)) { |
|
return; |
|
} |
|
|
|
$request->getSession()->write(self::LAST_PAGE_WITHOUT_AUTH, $request->getRequestTarget()); |
|
} |
|
|
|
public function getReferralAction(): string |
|
{ |
'excludeReferrer' => Configure::readOrFail('UtmTags.excludeReferrer'), |
|
]); |
|
|
|
$this->loadComponent('Auth'); |
|
$this->Auth->saveLastUrlWithoutAuth(); |
|
|
|
return parent::beforeRender($event); |
|
} |
|
|
{ |
|
$this->set('_isSearch', $this->Products->isSearch()); |
|
$this->set('_searchParams', $this->Products->searchParams()); |
|
|
|
return parent::beforeRender($event); |
|
} |
|
|
|
/** |
|
* @param string|array $url |
protected function _callListener(callable $listener, EventInterface $event) |
|
{ |
|
$data = (array)$event->getData(); |
|
|
|
return $listener($event, ...array_values($data)); |
|
} |
|
|
|
/** |
|
* @inheritDoc |
foreach ($listeners as $listener) { |
|
if ($event->isStopped()) { |
|
break; |
|
} |
|
$result = $this->_callListener($listener['callable'], $event); |
|
if ($result === false) { |
|
$event->stopPropagation(); |
|
} |
|
if ($result !== null) { |
} |
|
|
|
/** @var \Cake\Event\EventInterface $event */ |
|
$event = new $this->_eventClass($name, $subject, $data); |
|
$this->getEventManager()->dispatch($event); |
|
|
|
return $event; |
|
} |
|
} |
if ($layout !== null) { |
|
$builder->setLayout($layout); |
|
} |
|
|
|
$event = $this->dispatchEvent('Controller.beforeRender'); |
|
if ($event->getResult() instanceof Response) { |
|
return $event->getResult(); |
|
} |
|
if ($event->isStopped()) { |
if (method_exists($crudAction, 'view')) { |
|
$view = $crudAction->view(); |
|
} |
|
|
|
return $this->_controller->render($view); |
|
} |
|
|
|
/** |
|
* Get a CrudAction object by action name. |
$this->setRequest($request->withAttribute('filterQueryParams', $filterQueryParams)); |
|
}); |
|
|
|
try { |
|
return $this->Crud->execute(); |
|
} catch (NotFoundException $e) { |
|
$uri = Uri::getInstanceFromUri($this->getRequest()->getUri()); |
|
\assert($uri instanceof Uri); |
|
if ($uri->getQueryPart('page') > 1) { |
* @throws \UnexpectedValueException If return value of action is not `null` or `ResponseInterface` instance. |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null && !$result instanceof ResponseInterface) { |
|
throw new UnexpectedValueException(sprintf( |
|
'Controller actions can only return ResponseInterface instance or null. ' |
|
. 'Got %s instead.', |
#[\Override] |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
try { |
|
parent::invokeAction($action, $args); |
|
} catch (RedirectException $e) { |
|
if (Configure::read('debug', false) && Configure::read('redirectDebug', false)) { |
|
throw new DebugRedirectException($e->getMessage(), $e->getCode(), $e); |
|
} |
|
|
return; |
|
} |
|
|
|
parent::invokeAction($action, $args); |
|
} |
|
|
|
/** |
|
* Check if an action can be dispatched using CRUD. |
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result instanceof ResponseInterface) { |
|
return $result; |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
|
|
// This is needed for auto-wiring. Should be removed in 5.x |
|
$container->add(ComponentRegistry::class, $controller->components()); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
\assert($request instanceof ServerRequest); |
|
$cookieManager = new CookieManagerService($this->syneriseClient); |
|
if (!CookieManager::isPassedCookiesPolicy($request)) { |
|
if (!$cookieManager->getCookie($request, Cookie::SNRS_UUID)) { |
|
return $handler->handle($request); |
|
} |
|
$request = $cookieManager->removeSnrsUuid($request); |
|
|
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
return (new RedirectResponse($canonical, $status)) |
|
->withHeader('X-Redirect-Reason', 'canonical-redirect'); |
|
} |
|
|
|
return $handler->handle($request); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$request = $request |
|
->withAttribute('params', array_merge($request->getAttribute('params', []), ['?' => $queryParams])) |
|
->withQueryParams($queryParams); |
|
|
|
return $handler->handle($request); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$request = $request->withParam('locale', $locale); |
|
|
|
I18n::setLocale($locale ?: self::getDefaultLocale()); |
|
|
|
return $handler->handle($request); |
|
} |
|
|
|
/** |
|
* Wykonuje callback w kontekście podanego języka |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
} |
|
} |
|
|
|
if (!$lockdownEnabled) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if ($redirectUrl) { |
|
return (new Response()) |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
$request = $request->withAttribute('authentication', $service); |
|
$request = $request->withAttribute('authenticationResult', $result); |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
$authenticator = $service->getAuthenticationProvider(); |
|
|
|
if ($authenticator !== null && !$authenticator instanceof StatelessInterface) { |
|
$return = $service->persistIdentity($request, $response, $result->getData()); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$request = $request->withAttribute('authentication', $service); |
|
$request = $request->withAttribute('authenticationResult', $result); |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
$authenticator = $service->getAuthenticationProvider(); |
|
|
|
if ($authenticator !== null && !$authenticator instanceof StatelessInterface) { |
|
$return = $service->persistIdentity($request, $response, $result->getData()); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
) { |
|
Router::setRequest($request); |
|
} |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
: null; |
|
$middleware = new MiddlewareQueue($matching, $container); |
|
$runner = new Runner(); |
|
|
|
return $runner->run($middleware, $request, $handler); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$productsControllerNameFallback = Configure::read('productsControllerNameFallback', false); |
|
if (!$productsControllerNameFallback) { |
|
return $handler->handle($request); |
|
} |
|
$disableAzaFilters = (bool)Cache::read('disableAzaFilters', 'minute'); |
|
if ($disableAzaFilters) { |
|
Configure::write('productsControllerName', $productsControllerNameFallback); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
if (!in_array($request->getMethod(), $this->methods, true)) { |
|
return $handler->handle($request); |
|
} |
|
[$type] = explode(';', $request->getHeaderLine('Content-Type')); |
|
$type = strtolower($type); |
|
if (!isset($this->parsers[$type])) { |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
if ($request->getCookieParams()) { |
|
$request = $this->decodeCookies($request); |
|
} |
|
|
|
$response = $handler->handle($request); |
|
if ($response->hasHeader('Set-Cookie')) { |
|
$response = $this->encodeSetCookieHeader($response); |
|
} |
|
if ($response instanceof Response) { |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
->withQueryParams($queryParams) |
|
->withUri($request->getUri()->withQuery(http_build_query($uriQueryParams))) |
|
->withAttribute('originalRequest', $request); |
|
|
|
return $handler->handle($request); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
->withStatus(301) |
|
->withHeader('X-Redirect-Reason', 'colon-redirect'); |
|
} |
|
|
|
return $handler->handle($request); |
|
} |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$request->getUri()->getScheme() === 'https' |
|
|| ($this->config['disableOnDebug'] |
|
&& Configure::read('debug')) |
|
) { |
|
$response = $handler->handle($request); |
|
if ($this->config['hsts']) { |
|
$response = $this->addHsts($response); |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
if ($this->service->isEnabled()) { |
|
$this->service->loadPanels(); |
|
$this->service->initializePanels(); |
|
} |
|
$response = $handler->handle($request); |
|
|
|
if (!$this->service->isEnabled()) { |
|
return $response; |
|
} |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
) { |
|
Router::setRequest($request); |
|
} |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
If you want to customize this error message, create templates/Error/error500.php