-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#1664 - Fix errors recorded in log message on Manage Case scr… #16846
Conversation
(Standard links)
|
CRM/Activity/Page/AJAX.php
Outdated
@@ -56,7 +56,7 @@ public static function getCaseGlobalRelationships() { | |||
// get the total row count | |||
CRM_Case_BAO_Case::getGlobalContacts($globalGroupInfo, NULL, FALSE, TRUE, NULL, NULL); | |||
// limit the rows | |||
$relGlobal = CRM_Case_BAO_Case::getGlobalContacts($globalGroupInfo, $params['sortBy'], $showLinks = TRUE, FALSE, $params['offset'], $params['rp']); | |||
$relGlobal = CRM_Case_BAO_Case::getGlobalContacts($globalGroupInfo, CRM_Utils_Array::value('sortBy', $params), $showLinks = TRUE, FALSE, $params['offset'], $params['rp']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR - I've noticed these messages too. FYI @colemanw might revoke your Civi card if he sees this line. Use $params['sortBy'] ?? NULL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @demeritcowboy. Have updated the PR now.
CRM/Case/Page/AJAX.php
Outdated
@@ -182,7 +182,7 @@ public static function getCases() { | |||
$params = CRM_Core_Page_AJAX::defaultSortAndPagerParams(); | |||
$params += CRM_Core_Page_AJAX::validateParams($requiredParameters, $optionalParameters); | |||
|
|||
$allCases = (bool) $params['all']; | |||
$allCases = (bool) CRM_Utils_Array::value('all', $params, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$allCases = !empty($params['all']);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
@jitendrapurohit - @colemanw is on the warpath against CRM_Utils_Array::value - if you swap those out this is mergeable based on the review |
…een and case dashboard page
8406fb4
to
1d15448
Compare
ah, sorry, wasn't aware of that. Noticed loads of warning on case screen and quickly pushed a PR with the fix. I've updated the changes and removed the usage of Utils_Array now 👍 |
Merging based on @demeritcowboy 's review |
…een and case dashboard page
Overview
Various errors recorded in log message on
Before
See gitlab for steps to replicate the issue.
In addition, visiting the case dashboard page records the below error in drupal logs-
After
No error message is recorded.
Comments
Gitlab - https://lab.civicrm.org/dev/core/issues/1664