Skip to content
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

Php 8.x notice fix on tags & groups fields #29226

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public function buildQuickForm() {
}

// build tags and groups
CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm($this, 0, CRM_Contact_Form_Edit_TagsAndGroups::ALL,
CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm($this, $this->getContactID(), CRM_Contact_Form_Edit_TagsAndGroups::ALL,
FALSE, NULL, 'Group(s)', 'Tag(s)', NULL, 'select');

// build location blocks.
Expand Down
5 changes: 4 additions & 1 deletion CRM/Contact/Form/Edit/TagsAndGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static function buildQuickForm(
$form->addOptionalQuickFormElement('group');
// NYSS 5670
if (!$contactId && !empty($form->_contactId)) {
CRM_Core_Error::deprecatedWarning('this is thought to be unreachable, should be passed in');
$contactId = $form->_contactId;
}

Expand All @@ -73,8 +74,10 @@ public static function buildQuickForm(
if ($fieldName) {
$fName = $fieldName;
}
// The optional url parameter grid is refers to Group ID.
// If it set the group options on the page are limited to that group
$groupID = is_numeric(CRM_Utils_Request::retrieve('grid', 'Integer', $form)) ? (int) CRM_Utils_Request::retrieve('grid', 'Integer', $form) : NULL;

$groupID = $form->_grid ?? NULL;
if ($groupID && $visibility) {
$ids = [$groupID => $groupID];
}
Expand Down
3 changes: 3 additions & 0 deletions CRM/Profile/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class CRM_Profile_Form extends CRM_Core_Form {
* The group id that we are passing in url.
*
* @var int
*
* @deprecated
* @internal
*/
public $_grid;

Expand Down