Browse Source

Correction erreur 500 si page 0 appelée

Sangfroid 5 ngày trước cách đây
mục cha
commit
45cdad7b14
1 tập tin đã thay đổi với 3 bổ sung và 0 xóa
  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;
     }