$browserLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
Cake\Error\ErrorTrap->handleError() /var/www/vhosts/webmotion.it/subdomains/giringiro/src/Controller/AppController.php, line 338 App\Controller\AppController->browserLanguageRedirect() /var/www/vhosts/webmotion.it/subdomains/giringiro/src/Controller/AppController.php, line 133 App\Controller\AppController->beforeFilter() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Event/EventManager.php, line 332 Cake\Event\EventManager->_callListener() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Event/EventManager.php, line 316 Cake\Event\EventManager->dispatch() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 88 Cake\Controller\Controller->dispatchEvent() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Controller/Controller.php, line 604 Cake\Controller\Controller->startupProcess() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 156 Cake\Controller\ControllerFactory->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 141 Cake\Controller\ControllerFactory->invoke() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 362 Cake\Http\BaseApplication->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 106 Authentication\Middleware\AuthenticationMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 159 Cake\Http\Middleware\CsrfProtectionMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Middleware\BodyParserMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 117 Cake\Routing\Middleware\RoutingMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 79 Cake\Routing\Middleware\AssetMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/src/Middleware/CachedAssetMiddleware.php, line 45 App\Middleware\CachedAssetMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/markstory/asset_compress/src/Middleware/AssetCompressMiddleware.php, line 64 AssetCompress\Middleware\AssetCompressMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 115 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Runner.php, line 60 Cake\Http\Runner->run() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Server.php, line 104 Cake\Http\Server->run() /var/www/vhosts/webmotion.it/subdomains/giringiro/webroot/index.php, line 40 [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/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/webroot/index.php, line 40 [main]
$reasonPhrase = $response->getReasonPhrase();header(sprintf('HTTP/%s %d%s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159 Cake\Http\ResponseEmitter->emitStatusLine() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 68 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/webroot/index.php, line 40 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192 Cake\Http\ResponseEmitter->emitHeaders() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 69 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /var/www/vhosts/webmotion.it/subdomains/giringiro/webroot/index.php, line 40 [main]
`vscode:` of type `string` to int
📋
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:
*/ |
|
protected function checkNumeric(mixed $value): void |
|
{ |
|
if (!is_numeric($value) && !is_bool($value)) { |
|
throw new InvalidArgumentException(sprintf( |
|
'Cannot convert value `%s` of type `%s` to int', |
|
print_r($value, true), |
|
get_debug_type($value), |
|
)); |
if ($value === null || $value === '') { |
|
return null; |
|
} |
|
|
|
$this->checkNumeric($value); |
|
|
|
return (int)$value; |
|
} |
|
|
if (is_string($type)) { |
|
$type = TypeFactory::build($type); |
|
} |
|
if ($type instanceof TypeInterface) { |
|
$value = $type->toDatabase($value, $this->_driver); |
|
$type = $type->toStatement($value, $this->_driver); |
|
} |
|
|
|
return [$value, $type]; |
public function bindValue(string|int $column, mixed $value, string|int|null $type = 'string'): void |
|
{ |
|
$type ??= 'string'; |
|
if (!is_int($type)) { |
|
[$value, $type] = $this->cast($value, $type); |
|
} |
|
|
|
$this->params[$column] = $value; |
|
$this->performBind($column, $value, $type); |
return; |
|
} |
|
|
|
foreach ($bindings as $b) { |
|
$statement->bindValue($b['placeholder'], $b['value'], $b['type']); |
|
} |
|
} |
|
|
|
/** |
*/ |
|
public function run(Query $query): StatementInterface |
|
{ |
|
$statement = $this->prepare($query); |
|
$query->getValueBinder()->attachTo($statement); |
|
|
|
if ($query instanceof SelectQuery) { |
|
try { |
|
$this->getPdo()->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $query->isBufferedResultsEnabled()); |
* @return \Cake\Database\StatementInterface executed statement |
|
*/ |
|
public function run(Query $query): StatementInterface |
|
{ |
|
return $this->getDisconnectRetry()->run(fn() => $this->getDriver($query->getConnectionRole())->run($query)); |
|
} |
|
|
|
/** |
|
* Get query factory instance. |
{ |
|
$this->numRetries = 0; |
|
while (true) { |
|
try { |
|
return $action(); |
|
} catch (Exception $e) { |
|
if ( |
|
$this->numRetries < $this->maxRetries && |
|
$this->strategy->shouldRetry($e, $this->numRetries) |
* @return \Cake\Database\StatementInterface executed statement |
|
*/ |
|
public function run(Query $query): StatementInterface |
|
{ |
|
return $this->getDisconnectRetry()->run(fn() => $this->getDriver($query->getConnectionRole())->run($query)); |
|
} |
|
|
|
/** |
|
* Get query factory instance. |
*/ |
|
public function execute(): StatementInterface |
|
{ |
|
$this->_statement = null; |
|
$this->_statement = $this->_connection->run($this); |
|
$this->_dirty = false; |
|
|
|
return $this->_statement; |
|
} |
*/ |
|
public function all(): iterable |
|
{ |
|
if ($this->_results === null || $this->_dirty) { |
|
$this->_results = $this->execute()->fetchAll(StatementInterface::FETCH_TYPE_ASSOC); |
|
} |
|
|
|
return $this->_results; |
|
} |
return $this->_results; |
|
} |
|
|
|
if ($this->bufferedResults) { |
|
$results = parent::all(); |
|
} else { |
|
$results = $this->execute(); |
|
} |
|
$results = $this->getEagerLoader()->loadExternal($this, $results); |
} |
|
|
|
$results = $this->_cache?->fetch($this); |
|
if ($results === null) { |
|
$results = $this->_decorateResults($this->_execute()); |
|
$this->_cache?->store($this, $results); |
|
} |
|
$this->_results = $results; |
|
|
if ($this->_dirty) { |
|
$this->limit(1); |
|
} |
|
|
|
return $this->all()->first(); |
|
} |
|
|
|
/** |
|
* Get the first result from the executing query or raise an exception. |
|
|
$item = $this->dbTable->find() |
|
->contain($this->queryContain) |
|
->where($conditions) |
|
->first(); |
|
|
|
if (empty($item)) throw new NotFoundException(__('Not found')); |
|
|
|
$this->set(compact('item')); |
* @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 ' |
$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); |
|
|
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
$response = $handler->handle($request); |
|
|
|
return $this->_addTokenCookie($token, $request, $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 |
|
{ |
|
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); |
} |
|
|
|
$assetFile = $this->_getAssetFile($url); |
|
if ($assetFile === null || !is_file($assetFile)) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$file = new SplFileInfo($assetFile); |
|
$modifiedTime = $file->getMTime(); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
} |
|
|
|
// Calling $handler->handle() delegates control to the *next* middleware |
|
// In your application's queue. |
|
$response = $handler->handle($request); |
|
|
|
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); |
|
|
// 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(); |
|
} |
// 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