Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined index: nombre

Exception

ErrorException

  1.             'fotos' => 'all',
  2.             'id_cookie' => isset($_COOKIE['id_usuario_'.env('APP_NAME')])? $_COOKIE['id_usuario_'.env('APP_NAME')]:$this->getCookie(),
  3.             'user_id' => isset($_SESSION['id_user']) ? $_SESSION['id_user'] : 0,
  4.         ];
  5.         $producto $api->client->resJson('GET''productos/'.$id$params);
  6.         $pageTitle $producto['nombre'] . " - ".env('SITE_NAME');
  7.         $params = [
  8.             'campos' => ['id''nombre''id_marca'],
  9.             'fotos' => 1,
  10.             'limit' => 10,
  11.         ];
Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined index: nombre', '/var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Controllers/ProductosController.php', 22, array('request' => object(Request), 'api' => object(Api), 'id' => '25093', 'params' => array('fotos' => 'all', 'id_cookie' => '0bacc75e417a894deec79a9aea60bf82', 'user_id' => 0), 'producto' => array())) in /var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Controllers/ProductosController.php (line 22)
  1.             'fotos' => 'all',
  2.             'id_cookie' => isset($_COOKIE['id_usuario_'.env('APP_NAME')])? $_COOKIE['id_usuario_'.env('APP_NAME')]:$this->getCookie(),
  3.             'user_id' => isset($_SESSION['id_user']) ? $_SESSION['id_user'] : 0,
  4.         ];
  5.         $producto $api->client->resJson('GET''productos/'.$id$params);
  6.         $pageTitle $producto['nombre'] . " - ".env('SITE_NAME');
  7.         $params = [
  8.             'campos' => ['id''nombre''id_marca'],
  9.             'fotos' => 1,
  10.             'limit' => 10,
  11.         ];
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  2.             }));
  3.         }
  4.         return $this->prepareResponse(
  5.             $this->callActionOnArrayBasedRoute($routeInfo)
  6.         );
  7.     }
  8.     /**
  9.      * Call the Closure or invokable on the array based route.
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
Application->Laravel\Lumen\Concerns\{closure}(object(Request))
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return call_user_func($destination$passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}(object(Request)) in /var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Middleware/HabilitadaMiddleware.php (line 51)
  1.             $cookieStatus=new Cookie('santiagokohn_company_status'$companyStatustime() + (30 60));
  2.             if ($companyStatus == 0) {
  3.                 return response(view('servicio_suspendido'))->cookie($cookieStatus);
  4.             }else{
  5.                 return $next($request)->withCookie($cookieStatus);
  6.             }
  7.         }
  8.         if ($companyStatus == 0) {
  9.             return view('servicio_suspendido');
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return call_user_func($slice($stack$pipe), $passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  SymfonyRequest|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException

ErrorException:
Undefined index: nombre

  at /var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Controllers/ProductosController.php:22
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined index: nombre', '/var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Controllers/ProductosController.php', 22, array('request' => object(Request), 'api' => object(Api), 'id' => '25093', 'params' => array('fotos' => 'all', 'id_cookie' => '0bacc75e417a894deec79a9aea60bf82', 'user_id' => 0), 'producto' => array()))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Controllers/ProductosController.php:22)
  at App\Http\Controllers\ProductosController->producto(object(Request), object(Api))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/container/Util.php:37)
  at Illuminate\Container\Util::unwrapIfClosure(object(Closure))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod(object(Application), array(object(ProductosController), 'producto'), object(Closure))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call(object(Application), array(object(ProductosController), 'producto'), array(), null)
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/container/Container.php:596)
  at Illuminate\Container\Container->call(array(object(ProductosController), 'producto'), array())
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:386)
  at Laravel\Lumen\Application->callControllerCallable(array(object(ProductosController), 'producto'), array())
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:352)
  at Laravel\Lumen\Application->callLumenController(object(ProductosController), 'producto', array(true, array('as' => 'producto', 'uses' => 'App\\Http\\Controllers\\ProductosController@producto'), array()))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:326)
  at Laravel\Lumen\Application->callControllerAction(array(true, array('as' => 'producto', 'uses' => 'App\\Http\\Controllers\\ProductosController@producto'), array()))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:279)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute(array(true, array('as' => 'producto', 'uses' => 'App\\Http\\Controllers\\ProductosController@producto'), array()))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:264)
  at Laravel\Lumen\Application->handleFoundRoute(array(true, array('as' => 'producto', 'uses' => 'App\\Http\\Controllers\\ProductosController@producto'), array()))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:166)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(object(Request))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/app/Http/Middleware/HabilitadaMiddleware.php:51)
  at App\Http\Middleware\HabilitadaMiddleware->handle(object(Request), object(Closure))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(object(Request))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:423)
  at Laravel\Lumen\Application->sendThroughPipeline(array('App\\Http\\Middleware\\HabilitadaMiddleware'), object(Closure))
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:172)
  at Laravel\Lumen\Application->dispatch(null)
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:109)
  at Laravel\Lumen\Application->run()
     (/var/www/vhosts/santiagokohn_weyop.com.ar/fe/public/index.php:28)