Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request problem #19

Closed
GamalielMartinez opened this issue Nov 15, 2023 · 4 comments
Closed

request problem #19

GamalielMartinez opened this issue Nov 15, 2023 · 4 comments

Comments

@GamalielMartinez
Copy link

im tryng to do a post controller, in my controller i have echo app()->request()->get('nombre'), to see what they are sending me, but when i use request the next html error appears:

Leaf\Exceptions\ErrorException: Undefined array key 1 in file C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php on line 99
Stack trace:

  1. Leaf\Exceptions\ErrorException->() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:99
  2. Leaf\Exception\Run->handleError() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:99
  3. Leaf\Http\Request->input() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:235
  4. Leaf\Http\Request->body() C:\xampp\htdocs\PIA\vendor\leafs\http\src\Request.php:216
  5. Leaf\Http\Request->get() C:\xampp\htdocs\PIA\app\controllers\UsuarioController.php:9
  6. App\Controllers\UsuarioController->agregar() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:550
  7. call_user_func_array() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:550
  8. Leaf\Router\Core->invoke() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:521
  9. Leaf\Router\Core->handle() C:\xampp\htdocs\PIA\vendor\leafs\router\src\Router\Core.php:466
  10. Leaf\Router\Core->run() C:\xampp\htdocs\PIA\vendor\leafs\leaf\src\App.php:382
  11. Leaf\App->run() C:\xampp\htdocs\PIA\vendor\leafs\mvc-core\src\Core.php:121
  12. Leaf\Core->runApplication() C:\xampp\htdocs\PIA\public\index.php:110
  13. require_once() C:\xampp\htdocs\PIA\index.php:28
@GamalielMartinez
Copy link
Author

I want to install other version of leaf but composer dont let me, i can just use v3

@fadrian06
Copy link

Puedo responderte en español si gustas, ¿se ha solucionado tu problema o aún persiste?, coméntame más de él para intentar arreglarlo

@mychidarko
Copy link
Member

@GamalielMartinez were you able to figure this issue out?

@mychidarko mychidarko transferred this issue from leafsphp/leaf Aug 6, 2024
@mychidarko
Copy link
Member

This was most likely caused by passing url?key= (without any value as application/x-www-form-urlencoded). This has been fixed, a new release will be up soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants