$parts = explode('\\', static::class);trigger_error(sprintf(
Cake\Error\ErrorTrap->handleError() [internal], line ?? /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Controller/Controller.php /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Controller/Controller.php, line 313 Cake\Controller\Controller->__get() /opt/markstory-1766784742/src/Controller/DownloadsController.php, line 69 App\Controller\DownloadsController->view() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Controller/Controller.php, line 505 Cake\Controller\Controller->invokeAction() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 166 Cake\Controller\ControllerFactory->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 141 Cake\Controller\ControllerFactory->invoke() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 362 Cake\Http\BaseApplication->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Middleware/EncryptedCookieMiddleware.php, line 93 Cake\Http\Middleware\EncryptedCookieMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/authorization/src/Middleware/AuthorizationMiddleware.php, line 136 Authorization\Middleware\AuthorizationMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 106 Authentication\Middleware\AuthenticationMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 117 Cake\Routing\Middleware\RoutingMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 70 Cake\Routing\Middleware\AssetMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/markstory/asset_compress/src/Middleware/AssetCompressMiddleware.php, line 64 AssetCompress\Middleware\AssetCompressMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 115 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Runner.php, line 60 Cake\Http\Runner->run() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Server.php, line 104 Cake\Http\Server->run() /opt/markstory-1766784742/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 ?? /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65 Cake\Http\ResponseEmitter->emit() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /opt/markstory-1766784742/webroot/index.php, line 37 [main]
$reasonPhrase = $response->getReasonPhrase();header(sprintf('HTTP/%s %d%s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159 Cake\Http\ResponseEmitter->emitStatusLine() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 68 Cake\Http\ResponseEmitter->emit() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /opt/markstory-1766784742/webroot/index.php, line 37 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192 Cake\Http\ResponseEmitter->emitHeaders() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 69 Cake\Http\ResponseEmitter->emit() /opt/markstory-1766784742/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /opt/markstory-1766784742/webroot/index.php, line 37 [main]
$download = $this->Nodes->getNode($id); |
|
if (empty($download)) { |
|
throw new NotFoundException('Download not found'); |
|
} |
|
$this->request = $this->request->withParsedBody((array)$this->Cookie->read('Comment')); |
|
|
|
$this->Comments->displayNodeComments($this, $download->id); |
|
$this->set('download', $download); |
|
} |
* @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 ' |
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); |
$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 && $result->getData()) { |
|
$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); |
); |
|
} |
|
$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); |
|
|
// Make sure the request looks like an asset. |
|
$targetName = $this->getName($config, $request->getUri()->getPath()); |
|
if (!is_string($targetName)) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$queryParams = $request->getQueryParams(); |
|
if (isset($queryParams['theme'])) { |
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(); |
|
} |
$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