hcodebr / ecommerce

77 stars 69 forks source link

Erro Slim Model Cart #19

Open luacarol opened 2 years ago

luacarol commented 2 years ago

Como estava encontrando problemas em cada aula do curso, resolve pegar a aplicação pronta através do Git, mas mesmo assim eu encontro erros, não faz sentido pois está tudo idêntico.

Slim Application Error The application could not run because of the following error:

Details Code: 8 Message: Undefined index: idcart File: C:\ecommerce-master\vendor\hcodebr\php-classes\src\Model\Cart.php Line: 20 Trace

0 C:\ecommerce-master\vendor\hcodebr\php-classes\src\Model\Cart.php(20): Slim\Slim::handleErrors(8, 'Undefined index...', 'C:\ecommerce-ma...', 20, Array)

1 C:\ecommerce-master\site.php(70): Hcode\Model\Cart::getFromSession()

2 [internal function]: {closure}()

3 C:\ecommerce-master\vendor\slim\slim\Slim\Router.php(200): call_user_func_array(Object(Closure), Array)

4 C:\ecommerce-master\vendor\slim\slim\Slim\Slim.php(1210): Slim\Router->dispatch(Object(Slim\Route))

5 C:\ecommerce-master\vendor\slim\slim\Slim\Middleware\Flash.php(86): Slim\Slim->call()

6 C:\ecommerce-master\vendor\slim\slim\Slim\Middleware\MethodOverride.php(94): Slim\Middleware\Flash->call()

7 C:\ecommerce-master\vendor\slim\slim\Slim\Middleware\PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()

8 C:\ecommerce-master\vendor\slim\slim\Slim\Slim.php(1159): Slim\Middleware\PrettyExceptions->call()

9 C:\ecommerce-master\index.php(19): Slim\Slim->run()

10 {main}