http://54.77.160.52/new

Exceptions

Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher::hashPassword(): Argument #2 ($plainPassword) must be of type string, null given, called in /var/www/html/SIRH/src/Controller/Security/RegistrationController.php on line 66

  • Exception
  • Logs
  • Stack Trace

TypeError

  1.     public function __construct(PasswordHasherFactoryInterface $hasherFactory)
  2.     {
  3.         $this->hasherFactory $hasherFactory;
  4.     }
  5.     public function hashPassword(PasswordAuthenticatedUserInterface $userstring $plainPassword): string
  6.     {
  7.         $salt null;
  8.         if ($user instanceof LegacyPasswordAuthenticatedUserInterface) {
  9.             $salt $user->getSalt();
  10.         }
UserPasswordHasher->hashPassword() in src/Controller/Security/RegistrationController.php (line 66)
  1.         $user->setCreated(new \DateTime());
  2.         $user->setNom($request->get('nom'));
  3.         $user->setRoles(['ROLE_USER']);
  4.         $user->setPassword($userPasswordHasher->hashPassword(
  5.             $user,
  6.             $request->get('password')
  7.         ));
  8.         $user->isEnable(false);
  9.         $entityManager->persist($user);
  10.         $entityManager->flush();
  11.         return new JsonResponse("Veuillez contacter l'administrateur pour active votre compte!");
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  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 ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  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.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/html/SIRH/vendor/autoload_runtime.php') in public/index.php (line 6)
  1. <?php
  2. ini_set('memory_limit''-1');
  3. use App\Kernel;
  4. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  5. return function (array $context) {
  6.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  7. };