1
resposta

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Alura\Doctrine\Entity\Aluno::getNome(), 0 passed in C:\xampp\htdocs\class\doctrine-alura\commands\buscar-alunos.php on line 18 and exactly 1 expected in C:\xampp\htdocs\class\doctrine-alura\src\Entity\Aluno.php:31 Stack trace:

#0 C:\xampp\htdocs\class\doctrine-alura\commands\buscar-alunos.php(18): Alura\Doctrine\Entity\Aluno->getNome()

#1 {main} thrown in C:\xampp\htdocs\class\doctrine-alura\src\Entity\Aluno.php on line 31

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Alura\Doctrine\Entity\Aluno::getNome(), 0 passed in C:\xampp\htdocs\class\doctrine-alura\commands\buscar-alunos.php on line 18 and exactly 1 expected in C:\xampp\htdocs\class\doctrine-alura\src\Entity\Aluno.php:31 Stack trace:

#0 C:\xampp\htdocs\class\doctrine-alura\commands\buscar-alunos.php(18): Alura\Doctrine\Entity\Aluno->getNome()

#1 {main} thrown in C:\xampp\htdocs\class\doctrine-alura\src\Entity\Aluno.php on line 31

1 resposta

Olá!

Reveja as aulas e veja se está tudo ok com a sua sintaxe.

Se estiver tudo ok, tente rodar algum teste com o servidor embutido do PHP e veja se o erro persiste, pois o Xampp costuma bugar muito.

Espero ter ajudado!

Boa sorte em seus estudos!