瀏覽代碼

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;
     }