$cheapHotelsIds = [];
$cachePrices = Cache::read('cacheHotelPrices-'.$city_zone->id, 'static30day');
if ($cachePrices && is_array($cachePrices)) {
App\Controller\HotelsController->detailByCity() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Controller/Controller.php, line 560 Cake\Controller\Controller->invokeAction() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 140 Cake\Controller\ControllerFactory->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 115 Cake\Controller\ControllerFactory->invoke() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 325 Cake\Http\BaseApplication->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 166 Cake\Http\Middleware\CsrfProtectionMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/I18n/Middleware/LocaleSelectorMiddleware.php, line 61 Cake\I18n\Middleware\LocaleSelectorMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/src/Middleware/CartMiddleware.php, line 60 App\Middleware\CartMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/src/Middleware/ImageServerMiddleware.php, line 25 App\Middleware\ImageServerMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/authorization/src/Middleware/RequestAuthorizationMiddleware.php, line 110 Authorization\Middleware\RequestAuthorizationMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/authorization/src/Middleware/AuthorizationMiddleware.php, line 129 Authorization\Middleware\AuthorizationMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 124 Authentication\Middleware\AuthenticationMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Middleware\BodyParserMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/src/Middleware/SessionMiddleware.php, line 40 App\Middleware\SessionMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 189 Cake\Routing\Middleware\RoutingMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 77 Cake\Routing\Middleware\AssetMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 149 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Runner->run() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Server.php, line 99 Cake\Http\Server->run() /home/reservasbrasil/public_html/cb5/webroot/index.php, line 40 [main]
$message = "Unable to emit headers. Headers sent in file=$file line=$line";
trigger_error($message, E_USER_WARNING);
}
/home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\ResponseEmitter->emit() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /home/reservasbrasil/public_html/cb5/webroot/index.php, line 40 [main]
$response->getStatusCode(),
($reasonPhrase ? ' ' . $reasonPhrase : '')
));
/home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter->emitStatusLine() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\ResponseEmitter->emit() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /home/reservasbrasil/public_html/cb5/webroot/index.php, line 40 [main]
foreach ($values as $value) {
header(sprintf(
'%s: %s',
/home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter->emitHeaders() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\ResponseEmitter->emit() /home/reservasbrasil/public_html/cb5/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /home/reservasbrasil/public_html/cb5/webroot/index.php, line 40 [main]
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:
} |
|
} |
|
|
|
if (empty($table)) { |
|
throw new RuntimeException('Unable to locate an object compatible with paginate.'); |
|
} |
|
|
|
$settings += $this->paginate; |
|
|
'city' => $this->request->getParam('city') |
|
]*/ |
|
]; |
|
|
|
$this->set('hotels', $this->paginate($hotels)); |
|
|
|
|
|
} |
|
|
* @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.', |
$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 ' |
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
/** @var mixed $response */ |
|
$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 |
|
{ |
|
$locale = Locale::acceptFromHttp($request->getHeaderLine('Accept-Language')); |
|
if (!$locale) { |
|
return $handler->handle($request); |
|
} |
|
if ($this->locales !== ['*']) { |
|
$locale = Locale::lookup($this->locales, $locale, true); |
|
} |
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); |
|
|
// Agrega la URL del servidor de imágenes al objeto de solicitud
|
|
$request = $request->withAttribute('imageServerUrl', $imageServerUrl);
|
|
|
|
$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); |
} 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) { |
|
$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); |
*/ |
|
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); |
$session->write('Config.currency', 'USD');
|
|
}
|
|
}
|
|
|
|
$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); |
); |
|
} |
|
$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); |
*/ |
|
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); |
) { |
|
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