소스 검색

Correction erreur 500 si page 0 appelée

Sangfroid 5 일 전
부모
커밋
45cdad7b14
1개의 변경된 파일과 3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/Dto/FiltersDTO.php

+ 3 - 0
src/Dto/FiltersDTO.php

@@ -28,6 +28,9 @@ class FiltersDTO
         public int $page = 1
     )
     {
+        if ($this->page <= 0) {
+            $this->page = 1;
+        }
         $this->note = $this->note === '' ? null : (int)$this->note;
     }