Logos, robots and some fixs
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Form\MeType;
|
||||
use App\Form\MePasswordType;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
@@ -16,10 +17,12 @@ use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
class MeController extends AbstractController
|
||||
{
|
||||
private Security $security;
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function __construct(Security $security)
|
||||
public function __construct(Security $security, LoggerInterface $logger)
|
||||
{
|
||||
$this->security = $security;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
#[Route('/', name: 'index')]
|
||||
@@ -40,6 +43,8 @@ class MeController extends AbstractController
|
||||
} catch (\Throwable $th) {
|
||||
if ($_ENV['APP_ENV'] === 'dev') {
|
||||
throw $th; //DEBUG
|
||||
} else {
|
||||
$this->logger->error($th);
|
||||
}
|
||||
|
||||
$this->addFlash('danger', 'alert_error_editing_profile');
|
||||
@@ -88,6 +93,8 @@ class MeController extends AbstractController
|
||||
} catch (\Throwable $th) {
|
||||
if ($_ENV['APP_ENV'] === 'dev') {
|
||||
throw $th; //DEBUG
|
||||
} else {
|
||||
$this->logger->error($th);
|
||||
}
|
||||
|
||||
$this->addFlash('danger', 'alert_error_editing_password');
|
||||
|
||||
Reference in New Issue
Block a user