Skip to content

Commit

Permalink
make sure the url params are respected for multiple values retrieved …
Browse files Browse the repository at this point in the history
…from url
  • Loading branch information
yashodha committed Dec 2, 2021
1 parent ba493f7 commit a76a0b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CRM/Report/Utils/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ public static function intParam($fieldName, &$field, &$defaults) {
// send the type as string so that multiple values can also be retrieved from url.
// for e.g url like - "memtype_in=in&memtype_value=1,2,3"
$value = self::getTypedValue("{$fieldName}_value", CRM_Utils_Type::T_STRING);
if (!preg_match('/^(\d+)(,\d+){0,14}$/', $value)) {
//https://projects.cividesk.com/projects/9/tasks/4735
//change the max value to 20, ideally remove condition
if (!preg_match('/^(\d+)(,\d+){0,20}$/', $value)) {
// extra check. Also put a limit of 15 max values.
$value = NULL;
}
Expand Down

2 comments on commit a76a0b0

@yashodha
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contributed and merged :
civicrm#22214

@yashodha
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nganivet @yashodha
no need to maintain patch as this was merged in 5.46

Please sign in to comment.