Skip to content

Commit

Permalink
Remote Dataset: Fix for unexpected error for long URI string
Browse files Browse the repository at this point in the history
  • Loading branch information
mgbaybay committed Oct 7, 2024
1 parent cac83d1 commit 399b5e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Entity/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,11 @@ public function validate()
if ($this->rowLimit > $this->config->getSetting('DATASET_HARD_ROW_LIMIT')) {
throw new InvalidArgumentException(__('DataSet row limit cannot be larger than the CMS dataSet row limit'));
}

// Check if the length is within the current URI character limit
if (!v::stringType()->length(null, 250)->validate($this->uri)) {
throw new InvalidArgumentException(__('URI can not be longer than 250 characters'), 'uri');
}
}

try {
Expand Down

0 comments on commit 399b5e9

Please sign in to comment.