diff --git a/app/Filter/TaskProjectFilter.php b/app/Filter/TaskProjectFilter.php index 2b5082b2a..0acb72e7e 100644 --- a/app/Filter/TaskProjectFilter.php +++ b/app/Filter/TaskProjectFilter.php @@ -33,7 +33,9 @@ class TaskProjectFilter extends BaseFilter implements FilterInterface */ public function apply() { - if (is_int($this->value) || ctype_digit((string) $this->value)) { + // Max integer value for Postgres is +2147483647 + // See https://www.postgresql.org/docs/current/datatype-numeric.html + if (is_int($this->value) || ctype_digit((string) $this->value) && $this->value < 2147483647) { $this->query->eq(TaskModel::TABLE.'.project_id', $this->value); } else { $this->query->ilike(ProjectModel::TABLE.'.name', $this->value);