"0.0071830749511719 http://sis.silverjet.nl/nosvn/4site3.php?act=get_cache&branche=BE&lang=nl&data=%7B%220%22%3A%7B%22field%22%3A%22hotel_id%22%2C%22value%22%3A%22four-seasons-resort-marrakech%22%2C%22method%22%3A%22exact%22%7D%2C%22sitecode%22%3A%22201%22%7D"
Notice: Undefined offset: 0 (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: Undefined offset: 0

Exception

ErrorException

  1.      *
  2.      * @return array
  3.      */
  4.     public function getHotelCachedData($hotelId)
  5.     {
  6.         return json_decode($this->sisProvider->callSisApi('get_cache', [['field'=>'hotel_id','value'=>$hotelId,'method'=>'exact']]), true)[0];
  7.     }
  8.     private function getAccommodationImage($images)
  9.     {
  10.         foreach ($images as $image) {
HotelProvider->getHotelCachedData('four-seasons-resort-marrakech') in src/Controller/ContactController.php (line 205)
  1.         } elseif ($request->query->has('hotel')) {
  2.             $slug $request->query->get('hotel');
  3.             if(!empty($slug))
  4.             {
  5.                 $hotel $hotelProvider->getHotelCachedData($slug);
  6.                 $destination $destinationProvider->getDestination($hotel['destination_slugs'][0]);
  7.                 $country $countryProvider->getActive($hotel['country_slugs'][0]);
  8.                 $displayedDestination implode(" - "array_filter([$hotel['country_name'], $hotel['destination_names'][0] ?? null]));
  9.             }
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 43)
  1.     setcookie"iUserID"$_GET['iUserID'], time() + 60 60 24 30"/" );
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev'$_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

ErrorException

ErrorException:
Notice: Undefined offset: 0

  at src/DataProvider/HotelProvider.php:81
  at App\DataProvider\HotelProvider->getHotelCachedData('four-seasons-resort-marrakech')
     (src/Controller/ContactController.php:205)
  at App\Controller\ContactController->index(object(Request), object(SisProvider), object(CruiseProvider), object(RoundtripProvider), object(HotelProvider), object(DestinationProvider), object(DataCollectorTranslator), object(CountryProvider), object(Swift_Mailer))
     (vendor/symfony/http-kernel/HttpKernel.php:150)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:67)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:198)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:43)