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

Fix check permissions in civicrm_api call #1019

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

peetCreative
Copy link
Contributor

Overview

I found that with my setup searching for existing contacts by city did not work.
After fideling around I found that checkpermissions was not set FALSE before calling the civicrm_api4.

Technical Details

This was due to the behaviour of += for php arrays, which won't overwrite existing elements.
As the element $params['checkPermissions'] was set true earlier, the element was not overwritten by += and so the explicit join did not work.

I added a quick fix, setting the element in the common way. Also one other function.

Comments

However I found, that the extension is using += quit often. But I wonder if there is a need for it?

@KarinG
Copy link
Collaborator

KarinG commented Oct 29, 2024

5.79 RC build crashed but not due to this PR. Merging (tests will run again on merge).

@KarinG
Copy link
Collaborator

KarinG commented Oct 29, 2024

Thanks for this too 👍

@KarinG KarinG merged commit 4df2f24 into colemanw:6.x Oct 29, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants