trigger_error($message, E_USER_DEPRECATED);
}
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Core/functions.php /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Core/functions.php, line 384 /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/ORM/Table.php /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/ORM/Table.php, line 1539 Cake\ORM\Table->get() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/ORM/Association.php, line 1168 Cake\ORM\Association->__call() /var/www/clients/client400/web2226/web/src/Controller/AttemptsController.php, line 229 App\Controller\AttemptsController->speedGame() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Controller/Controller.php, line 505 Cake\Controller\Controller->invokeAction() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 166 Cake\Controller\ControllerFactory->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 141 Cake\Controller\ControllerFactory->invoke() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 362 Cake\Http\BaseApplication->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/authorization/src/Middleware/RequestAuthorizationMiddleware.php, line 110 Authorization\Middleware\RequestAuthorizationMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/authorization/src/Middleware/AuthorizationMiddleware.php, line 136 Authorization\Middleware\AuthorizationMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 106 Authentication\Middleware\AuthenticationMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 169 Cake\Http\Middleware\CsrfProtectionMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Middleware\BodyParserMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 117 Cake\Routing\Middleware\RoutingMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 70 Cake\Routing\Middleware\AssetMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 115 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Runner.php, line 60 Cake\Http\Runner->run() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Server.php, line 104 Cake\Http\Server->run() /var/www/clients/client400/web2226/web/webroot/index.php, line 37 [main]
$message = "Unable to emit headers. Headers sent in file={$file} line={$line}";
trigger_error($message, E_USER_WARNING);
}
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65 Cake\Http\ResponseEmitter->emit() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/clients/client400/web2226/web/webroot/index.php, line 37 [main]
$reasonPhrase = $response->getReasonPhrase();
header(sprintf(
'HTTP/%s %d%s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159 Cake\Http\ResponseEmitter->emitStatusLine() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 68 Cake\Http\ResponseEmitter->emit() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/clients/client400/web2226/web/webroot/index.php, line 37 [main]
foreach ($values as $value) {
header(sprintf(
'%s: %s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192 Cake\Http\ResponseEmitter->emitHeaders() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 69 Cake\Http\ResponseEmitter->emit() /var/www/clients/client400/web2226/web/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/clients/client400/web2226/web/webroot/index.php, line 37 [main]
`CORE/src/Error/Renderer/HtmlErrorRenderer.php`
on line `37`
📋
$this->headerSentInfo['line'], |
|
); |
|
} |
|
|
|
throw new CakeException($message); |
|
} |
|
|
|
if (!is_array($name)) { |
|
$name = [$name => $value]; |
'element' => $options['element'], |
|
'params' => $options['params'], |
|
]; |
|
|
|
$this->session->write('Flash.' . $options['key'], $messages); |
|
} |
|
|
|
/** |
|
* Set an exception's message as flash message. |
{ |
|
if ($message instanceof Throwable) { |
|
$this->flash()->setExceptionMessage($message, $options); |
|
} else { |
|
$this->flash()->set($message, $options); |
|
} |
|
} |
|
|
|
/** |
} |
|
$options += (array)$args[1]; |
|
} |
|
|
|
$this->set($args[0] ?? $args['message'], $options); |
|
} |
|
} |
|
|
->where(['topic_id' => $topicId, 'active' => true]) |
|
->first(); |
|
|
|
if (empty($game)) { |
|
$this->Flash->error(__('Neplatné cvičení.')); |
|
return $this->redirect(['controller' => 'Topics', 'action' => 'index']); |
|
} |
|
|
|
if ($exercise->xp < 12) { |
* @return void |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null) { |
|
assert( |
|
$result instanceof Response, |
|
sprintf( |
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')), |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result !== null) { |
|
return $result; |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
} |
|
|
|
$controller = $this->controllerFactory->create($request); |
|
|
|
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 ' |
} catch (Exception $exception) { |
|
return $this->handleException($exception, $request, $this->getConfig('unauthorizedHandler')); |
|
} |
|
|
|
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($attribute, $identity); |
|
} |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
|
|
if ($this->getConfig('requireAuthorizationCheck') && !$service->authorizationChecked()) { |
|
throw new AuthorizationRequiredException(['url' => $request->getRequestTarget()]); |
|
} |
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) { |
|
/** |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$this->_validateToken($request); |
|
$request = $this->_unsetTokenField($request); |
|
} |
|
|
|
return $handler->handle($request); |
|
} |
|
|
|
/** |
|
* Set callback for allowing to skip token check for particular 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 |
|
{ |
|
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); |
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$container = $this->app instanceof ContainerApplicationInterface |
|
? $this->app->getContainer() |
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 (str_contains($url, '..') || !str_contains($url, '.')) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (str_contains($url, '/.')) { |
|
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, Router::getRequest() ?? $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); |
$this->queue = $queue; |
|
$this->queue->rewind(); |
|
$this->fallbackHandler = $fallbackHandler; |
|
|
|
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